Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 extjs4 进行开发。 如图所示,我有两个网格,当我单击Grid Panel 1该 contanis的行时Number 1,我希望Grid Panel 2仅显示包含Number 1.
Grid Panel 1
Number 1
Grid Panel 2
这非常简单。订阅第一个网格的选择事件,并在该处理程序中过滤第二个网格的存储。就是这样。
grid1.on('select', function(grid,record) { grid2.store.clearFilter(true); // see http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.Store-method-clearFilter grid2.store.filter('Number', record.get('Number'); },this);