如何在 Extjs 网格标题菜单上添加额外按钮
有人需要在网格面板标题菜单(排序\列)中添加一个额外的按钮吗? 我可能想在菜单中添加另一个按钮来重置为默认列模型。我可以使用 Jquery 来完成此操作,但我想知道是否有 EXTjs 方法可以做到这一点。
谢谢
has anybody had the need to add an extra button to the grid panel header menu(sorting\columns)?
potentially I would like to add another button to the menu that resets to the default columns model. I can accomplish this using Jquery but I was wondering if there is an EXTjs way to do it.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要深入研究源代码才能看到它的存在,但是
GridPanel
有一个view
属性,即它的GridView
,而GridView
又具有 < code>hmenu 属性,这是当您单击这些列标题之一时显示的菜单。因此,使用名为
gridpanel
的GridPanel
(一旦呈现),您可以执行以下操作:You need to dig through the source to see it's there, but a
GridPanel
has aview
property which is itsGridView
which in turn has ahmenu
property which is the menu it shows when you click on one of those column headers.So, with a
GridPanel
calledgridpanel
(once it's rendered) you can do the following: