SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.onKeyDown  event

It will be fired if there is keyboard input in grid or editor. 

If explicitly return false, it will cancel grid or editor input. For example, if return false when type RIGHT key, you will not be able to do cell moving by right arrow key. 

function onKeyDown (grid: GridBase, key: Integer, ctrl: Boolean, shift: Boolean, alt: Boolean);
Returns
Void
Parameters
grid - GridBase.
key - Integer.
ctrl - Boolean.
shift - Boolean.
alt - Boolean.
Code -1
    grid.onKeyDown = function (grid, key, ctrl, shift, alt) {
        if (key == 39) { // Right arrow key
            return false;
        }
    }
See Also
onEditChanged
onEditCanceled
onEditCommitted
onPasted
Examples
Cell Editing
Text Editors