How to set focus on a particular row in a datagrid/gridview?

前端 未结 6 1559
清酒与你
清酒与你 2021-01-04 18:07

I have a datagrid/gridview. I\'m populating the grid with 10 rows initially. On a button click every time,I\'m keeping on adding 10 rows to the datagrid/gridview. Now I want

6条回答
  •  清歌不尽
    2021-01-04 18:54

    Try this, I'm works well with below script snippet in Extjs 4.2.0.

    //currentIndex is the index of grid row
    var rowElement = this.getView().getRecord(currentIndex);
    this.getView().focusRow(rowElement);
    

提交回复
热议问题