SMART datagrid v.1 > Classes > GridBase
DataLudi.GridBase.onCurrentChanged event
当具有输入焦点的单元格位置发生变更时,将会触发这个事件。
在变更之前,将会触发onCurrentChanging事件。
function onCurrentChanged (grid: GridBase, newIndex: CellIndex);
- Returns
- Void
- Parameters
- grid - GridBase.
- newIndex - CellIndex.
- Note
- 因为参数newIndex是内部共享对象,所以不得储存。 如果需要newIndex值,就需要通过newIndex.clone而进行使用。
Code -1
grdMain.onCurrentChanged = function (grid, newIndex) {
$('#currRow').text(newIndex.rowIndex);
#('#currCol').text(newIndex.column.name());
};
- See Also
- onCurrentChanging
- CellIndex
- Examples
- 聚焦单元格