1
1
另一种可能性是创建一个子类gridpanel。此子类的构造函数可以检查其给定的pagingtoolbar配置配置。如果存在,则实例化存储(如果需要),并将其引用到pagingtoolbar配置。
示例用法:
另一个选项是使用CreateSinterceptor将上述行为直接应用于网格面板:
这将允许您继续使用xtype:'grid'。 |
2
1
pagingtoolbar未链接到其存储的网格的原因是pagingtoolbar可以与任何支持分页的组件一起使用,而不仅仅是网格,因此您必须显式地将存储分配给它(这可能是其他组件也使用的共享存储)。 不知道您的代码为什么不能正常工作——我假设您的查找调用不能返回有效的存储引用。两种明显的可能性是ID错误,或者商店还不存在。既然你没有发布任何其他代码,就不可能再告诉别人了。顺便说一句,您应该能够简单地将网格使用的商店引用直接分配到工具栏,而不必进行查找,但我想这取决于应用程序的结构。 |
3
1
每当您定义它时都会执行的配置——通常是在它被实例化之前执行的。所以
这是ExtJS使用静态配置方式的一个缺点。您需要做的是重写网格,然后通过编程设置工具栏的存储,或者在网格上使用beforerender事件,如下所示:
编辑: 已将BBAR更改为GetBottomToolbar()。 |
4
1
实际上,在3.2.0版本中,listnere并没有为我工作(它填充了网格,但不允许我更改页面)。问题是,ext不知道它必须重建工具栏(正如您刚刚修改了一个变量)。固定波纹管:
|
harunB10 · Sencha未被识别为内部或外部命令 6 年前 |
Y.Rad · 如何在特定位置添加项目 6 年前 |
jenkelblankel · 绑定按钮在Ext JS中不起作用 6 年前 |
Hemant · 如何将onkeyup事件用于文本字段? 6 年前 |
Zoti · 具有无限滚动的extjs 6现代组合框 6 年前 |
Vikas Hire · 在其存储更新中更新extjs图表配置 6 年前 |