SMART datagrid v1.4 > Classes > GridBase

Back  Forward

DataLudi.GridBase.onCurrentChanging  event

입력 포커스를 갖는 셀의 위치가 변경되기 직전에 발생한다. 

이 이벤트 핸들러 내에서 명시적으로 Boolean false를 리턴하면 위치가 변경되지 않는다. 실제 위치가 변경된 후에는 onCurrentRowChanged, onCurrentChanged 이벤트가 차례로 발생한다. 

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