Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
计算gridpanel extjs中选定行的数目_Extjs_Count_Grid_Store - Fatal编程技术网

计算gridpanel extjs中选定行的数目

计算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

我有一个包含数据的gridpanel,我可以通过
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());
            }
        }