SMART datagrid v.1 > Classes > GridBase
DataLudi.GridBase.focusedIndex property
目前具有输入焦点的数据单元格的位置。
用户可以通过输入Tab键或方向键或点击鼠标而变更位置。 如果在单元格编辑中发生变更,就会进行编辑提交,并且在提交后,变更位置。
- Getter
- function focusedIndex(): CellIndex
Code -1
var idx = grid.focusedIndex().clone();
idx.rowIndex = idx.rowIndex + 1;
grid.setFocusedIndex(idx);
- Note
- 通过focusedIndex()而返回或变更用于设置的CellIndex对象的值,将不会影响网格的focusedIndex。 而且,不得在超出调用这个属性的scope的范围,保管和使用被返回的对象。 如果有必要变更使用,则可以进行clone()后使用。
- See Also
- focusedColumn
- focusedRow
- focusedRowIndex
- onCurrentChanging
- onCurrentChanged
- onCurrentRowChanged
- CellIndex
- CellIndex.clone
- Examples
- 聚焦单元格