SMART datagrid v.1 > Classes > GridBase
DataLudi.GridBase.onPaste event
在用户输入Ctrl+V或*Cmd+V"而粘贴剪贴板文本至聚焦单元格位置之前,将会触发这个事件。
如果在事件处理器中明确返回Boolean false,就会取消粘贴。 而且,在提交粘贴之后,将会触发onPasted事件。
function onPaste (grid: GridBase, index: CellIndex, data: String): Boolean;
- Returns
- Boolean - 如果返回Boolean false,就会取消粘贴。
- 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
- 剪贴板粘贴
- 剪贴板复制