计算gridpanel extjs中选定行的数目
我有一个包含数据的gridpanel,我可以通过计算gridpanel extjs中选定行的数目,extjs,count,grid,store,Extjs,Count,Grid,Store,我有一个包含数据的gridpanel,我可以通过store.getcount()显示网格中记录的总数。单击记录时,我希望显示所选记录的编号 例如: 记录总数为5条 我单击第一行 文本框将显示1/5 在网格选择侦听器中尝试以下操作: listeners:{ select: function(selModel, record, index, options) { your_textfield.setValue(index+'/'+Ext.ge
store.getcount()
显示网格中记录的总数。单击记录时,我希望显示所选记录的编号
例如:
- 记录总数为5条
- 我单击第一行
- 文本框将显示1/5
listeners:{
select: function(selModel, record, index, options) {
your_textfield.setValue(index+'/'+Ext.getCmp('yourGridId').store.getCount());
}
}
在网格选择侦听器中尝试以下操作:
listeners:{
select: function(selModel, record, index, options) {
your_textfield.setValue(index+'/'+Ext.getCmp('yourGridId').store.getCount());
}
}