SMART datagrid v.1 > Classes > GridBase
DataLudi.GridBase.onCopy event
It will be fired just before the user inputs Ctrl+C or *Cmd+C" to copy the selection area to clipboard.
If explicitly return Boolean false within event handler, it will cancel copy. And, if there are multiple selection areas, it will only copy the area selected lastly.
function onCopy (grid: GridBase, range: CellRange|CellIndex, data: String): Boolean;
- Returns
- Boolean - If return Boolean false, copy will be cancelled.
- Parameters
- grid - GridBase.
- range - CellRange|CellIndex.
The area which will be copied.
If it is a single cell, it will be
CellIndex, and if it is multiple cell area, it will be
CellRange object.
- data - String.
The text which will be transferred to clipboard.
Code -1
grid.onCopy = function (grid, range, data) {
return $('#chkCopy')[0].checked;
};
- See Also
- onPaste
- onPasted
- Examples
- Clipboard Copy
- Clipboard Paste
- Multiple Selection