SMART datagrid v.1 > Classes > GridBase
DataLudi.GridBase.setFocusedRow method
通过指定在参数rowIndex的行,变更聚焦单元格的位置。
rowIndex可以是index或行对象。 不变更现有聚焦单元格的列的位置,而只变更行的位置。 如果rowIndex为网格行,并且其祖辈行为折叠状态,就会首先显示网格行。
如果只想变更列的位置而非行的位置,就可以使用setFocusedColumn。 请参考setFocusedIndex。
function setFocusedRow (rowIndex: Integer|GridRow, focus: Boolean, select: Boolean): this;
- Returns
- this
- Parameters
- rowIndex - Integer|GridRow. required.
- focus - Boolean. 默认值为false.
- select - Boolean. 默认值为true.
Code -1
grid.setFocusedRow(10);
var row = grid.getRow(11);
grid.setFocusedRow(row);
- See Also
- focusedIndex
- setFocusedColumn
- setFocusedIndex
- setFocusedCell
- GroupRow.collapsed
- GridRow
- CellIndex
- Examples
- 聚焦单元格