Copy / Paste
If singleMode of grid copyOptions or pasteOptions is false (the default), you can copy one or more selected cells to the clipboard, or paste clipboard data comprising one or more cells into the grid. However, for security purposes, such copy/paste requires the user to use Ctrl
+C
(windows), command
+C
(mac) or Ctrl
+V
(windows), command
+ It can only be run by directly typing the V
(mac) key. In other words, it cannot be executed through the shortcut menu or javascript API.
Copy Options
You can set whether to allow copying in the grid by setting Copy Options.
gridView.setCopyOptions({
singleMode: document.getElementById("chkSingleMode").checked,
enabled: document.getElementById("chkEnabled").checked
});
Paste Options
You can set various options required when pasting by setting Paste Options.
gridView.setPasteOptions({
singleMode: document.getElementById("chkPasteSingleMode").checked,
enabled: document.getElementById("chkPasteEnabled").checked,
startEdit: document.getElementById("chkStartEdit").checked,
commitEdit: document.getElementById("chkCommitEdit").checked,
enableAppend: document.getElementById("chkEnableAppend").checked,
fillFieldDefaults: document.getElementById("chkFillFieldDefaults").checked,
fillColumnDefaults: document.getElementById("chkFillColumnDefaults").checked,
forceRowValidation: document.getElementById("chkForceRowValidation").checked,
forceColumnValidation: document.getElementById("chkForceColumnValidation").checked,
selectionBase: document.getElementById("chkSelectionBase").checked,
stopOnError: document.getElementById("chkStopOnError").checked,
noEditEvent: document.getElementById("chkNoEditEvent").checked,
eventEachRow: document.getElementById("chkEventEachRow").checked,
checkReadOnly: document.getElementById("chkCheckReadOnly").checked,
checkDomainOnly: document.getElementById("chkCheckDomainOnly").checked,
convertLookupLabel: document.getElementById("chkConvertLookupLabel").checked
});