SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.onCurrentChanging  event

在具有输入焦点的单元格位置发生变更之前,将会触发这个事件。 

如果在这个事件处理器中明确返回Boolean false,就不会变更位置。 在位置实际发生变更之后,将会依次触发onCurrentRowChangedonCurrentChanged事件。 

function onCurrentChanging (grid: GridBase, newIndex: CellIndex, oldIndex: CellIndex): Boolean;
Returns
Boolean
Parameters
grid - GridBase.
newIndex - CellIndex.
oldIndex - CellIndex.
Note
Code -1
    grdMain.onCurrentChaning = function (grid, newIndex, oldIndex) {
        if (newIndex.rowIndex > 3) {
            return false;
        }
    };
See Also
onCurrentChanged
onCurrentRowChanged
focusedIndex
CellIndex
Examples
聚焦单元格