SMART datagrid v.1 > Classes > GridBase

[ grids ver.1.3.9]   Back  Forward

DataLudi.GridBase.onPaste  event

It will be fired just before the user types Ctrl+V or *Cmd+V" to paste clipboard text to the location of focused cell. 

If explicitly return Boolean false within event handler, it will cancel pasting. And, onPasted event will be fired after committing pasting. 

function onPaste (grid: GridBase, index: CellIndex, data: String): Boolean;
Returns
Boolean - If return Boolean false, it will cancel pasting.
Parameters
grid - GridBase.
index - CellIndex.
data - String.
Code -1
    grid.onPaste = function (grid, index, data) {
        return !$('#readOnly')[0].checked;
    };
See Also
onPasted
onEditRowPasted
onCopy
Examples
Clipboard Paste
Clipboard Copy