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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.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
Extjs 4 GridPanel:如何通过id获取元素的行索引(位置)_Extjs_Grid_Extjs4 - Fatal编程技术网

Extjs 4 GridPanel:如何通过id获取元素的行索引(位置)

Extjs 4 GridPanel:如何通过id获取元素的行索引(位置),extjs,grid,extjs4,Extjs,Grid,Extjs4,如何通过ExtJS GridPanel中的id获取行的行索引(位置)?使用方法: var record=store.getNodeById(id), rowIndex=store.indexOf(记录); 要在Ext4中获取记录,请使用store.getAt()@A1rPun-store.getAt()将行索引作为参数。这就是OP想要的。这实际上是最好的答案,应该是可以接受的答案。 var rowIndex = store.indexOfId(id);

如何通过ExtJS GridPanel中的id获取行的行索引(位置)?

使用方法:

var record=store.getNodeById(id),
rowIndex=store.indexOf(记录);


要在Ext4中获取记录,请使用
store.getAt()
@A1rPun-store.getAt()将行索引作为参数。这就是OP想要的。这实际上是最好的答案,应该是可以接受的答案。
var rowIndex = store.indexOfId(id);