SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.onCurrentChanging  event

It will be fired just before Location of Cell which has input focus is changed. 

If explicitly return Boolean false within this event handler, the location will not be changed. After the location is actually changed, onCurrentRowChanged, onCurrentChanged events will be fired in order. 

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
Focused Cell