{
    "componentChunkName": "component---src-templates-doc-page-jsx",
    "path": "/angular-data-grid/clipboard/",
    "result": {"data":{"markdownRemark":{"htmlAst":{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can copy and paste items to and from the grid using the system clipboard."}]},{"type":"element","tagName":"h2","properties":{"id":"how-to-copy","style":"position:relative;"},"children":[{"type":"text","value":"How to copy"},{"type":"element","tagName":"a","properties":{"href":"#how-to-copy","ariaLabel":"how to copy permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Copying from the grid is "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"enabled by default"}]},{"type":"text","value":" for enterprise users. To copy your selection to the system clipboard, you can use the keybind "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"C"}]},{"type":"text","value":", or right click on a cell and select 'Copy' from the context menu. Unless "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/range-selection"},"children":[{"type":"text","value":"Range Selection"}]},{"type":"text","value":" or "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/row-selection"},"children":[{"type":"text","value":"Row Selection"}]},{"type":"text","value":" is enabled, you will only be copying from the currently focused cell."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"When copying multiple cells, the contents will be copied in an Excel compatible format, with fields\nseparated by a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"\\t"}]},{"type":"text","value":" (tab) character."}]},{"type":"element","tagName":"h2","properties":{"id":"copying-cell-ranges","style":"position:relative;"},"children":[{"type":"text","value":"Copying Cell Ranges"},{"type":"element","tagName":"a","properties":{"href":"#copying-cell-ranges","ariaLabel":"copying cell ranges permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"When "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/range-selection"},"children":[{"type":"text","value":"Cell Ranges"}]},{"type":"text","value":" are enabled by setting "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"gridOptions.enableRangeSelection=true"}]},{"type":"text","value":", copying will copy the Cell Range's content to your clipboard. Select a range by clicking on a cell and dragging with the mouse, then copy with the "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"C"}]},{"type":"text","value":" keybind."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Multiple cell ranges can be selected at once using "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":" and dragging with the mouse. When copying, all ranges will be copied to the clipboard. Note that the relative positions of multiple ranges is not preserved when copying, they are stacked vertically in the clipboard."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The column headers can be copied to the clipboard in addition to the cell contents by enabling the option "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"copyHeadersToClipboard"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"grid-options/properties.json","section":"clipboard","names":"[\"copyHeadersToClipboard\"]"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In the below example "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"copyHeadersToClipboard"}]},{"type":"text","value":" has been enabled, try:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Select a cell range with click & drag"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Copy with "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"C"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Paste into an external program / text editor, note that the column headers were also copied."}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Copying Cell Ranges","name":"copy-range","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"menu\", \"range\", \"clipboard\"] }"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"copying-rows","style":"position:relative;"},"children":[{"type":"text","value":"Copying Rows"},{"type":"element","tagName":"a","properties":{"href":"#copying-rows","ariaLabel":"copying rows permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"When "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/row-selection"},"children":[{"type":"text","value":"Row Selection"}]},{"type":"text","value":" is enabled by setting "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"gridOptions.rowSelection"}]},{"type":"text","value":" to either "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"\"single\""}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"\"multiple\""}]},{"type":"text","value":", then copying while a row is selected will add the whole row's contents to your clipboard."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The below example demonstrates copying rows:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Please select one or more rows in the example below and press CTRL+C"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Paste copied content in a text editor"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Note pasted content includes all selected rows"}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Copying Rows","name":"copy-row","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"menu\", \"clipboard\"] }"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you want to use row selection for another purpose and wish to copy the focused cell instead of selected rows, you can disable copying rows by setting\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"gridOptions.suppressCopyRowsToClipboard=true"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"grid-options/properties.json","section":"clipboard","names":"[\"suppressCopyRowsToClipboard\"]"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The below example demonstrates copying the focused cell only when using row selection:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Please select one or more rows in the example below and press CTRL+C"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Paste copied content in a text editor"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Note pasted content includes focused cell only"}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Suppress Copying Rows","name":"suppress-copy-row","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"menu\", \"clipboard\"] }"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"mixed-copying-cell-ranges--rows","style":"position:relative;"},"children":[{"type":"text","value":"Mixed Copying Cell Ranges & Rows"},{"type":"element","tagName":"a","properties":{"href":"#mixed-copying-cell-ranges--rows","ariaLabel":"mixed copying cell ranges  rows permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The copy operation copies the selected content in the following order of precedence:"}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Cell Ranges (if "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/range-selection"},"children":[{"type":"text","value":"Range Selection"}]},{"type":"text","value":" is enabled)"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Row Selection (if "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/row-selection"},"children":[{"type":"text","value":"Row Selection"}]},{"type":"text","value":" is enabled and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"suppressCopyRowsToClipboard"}]},{"type":"text","value":" is "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"not"}]},{"type":"text","value":" enabled)"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Focused Cell"}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"When both range selection and row selection are enabled, the default behaviour of copying ranges over copying rows can make it impossible for users to copy rows (as the selected cell range is copied by default). Enabling the grid option "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"gridOptions.suppressCopySingleCellRanges=true"}]},{"type":"text","value":" makes it possible to copy the selected rows when only a single cell is selected via range selection. "}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"grid-options/properties.json","section":"clipboard","names":"[\"suppressCopySingleCellRanges\"]"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In this mode, when multiple cells are selected via range selection, the cell range is copied and not the selected rows. This behaviour is not enabled by default since it can be confusing for the copy behaviour to change depending on how much is selected."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The below example has range selection, row selection and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"suppressCopySingleCellRanges"}]},{"type":"text","value":" enabled."}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Select a range by clicking & dragging on a cell."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Copy with "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"C"}]},{"type":"text","value":", paste into a text editor, observe that the range was copied."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Deselect this range by clicking on any cell"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Select one or more rows by moving focus with the arrow keys and pressing the "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"SPACE"}]},{"type":"text","value":" key to toggle the row's selection."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Copy with "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"C"}]},{"type":"text","value":", paste into a text editor and observe that the rows were copied."}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Copying Mixed Ranges & Rows","name":"copy-mixed","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"menu\", \"range\", \"clipboard\"] }"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"custom-clipboard-interaction","style":"position:relative;"},"children":[{"type":"text","value":"Custom clipboard interaction"},{"type":"element","tagName":"a","properties":{"href":"#custom-clipboard-interaction","ariaLabel":"custom clipboard interaction permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you want to do the copy to clipboard yourself (i.e. not use the grid's clipboard interaction) then implement the callback "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"sendToClipboard(params)"}]},{"type":"text","value":". Use this if you are in a non-standard web container that has a bespoke API for interacting with the clipboard. The callback gets the data to go into the clipboard, it's your job to call the bespoke API."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The example below shows using "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"sendToClipboard(params)"}]},{"type":"text","value":", but rather than using the clipboard, demonstrates the callback by just printing the data to the console."}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Controlling Clipboard Copy","name":"custom","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"menu\", \"range\", \"clipboard\"] }"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"copying-via-the-api","style":"position:relative;"},"children":[{"type":"text","value":"Copying via the API"},{"type":"element","tagName":"a","properties":{"href":"#copying-via-the-api","ariaLabel":"copying via the api permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can use the Grid API methods: "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"copySelectedRowsToClipboard(...)"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"copySelectedRangeToClipboard(...)"}]},{"type":"text","value":"\nto copy rows or ranges respectively, these API calls take optional parameters to enable copying column and group headers."}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"grid-api/api.json","section":"clipboard","names":"[\"copySelectedRangeToClipboard\", \"copySelectedRowsToClipboard\"]"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"how-to-cut","style":"position:relative;"},"children":[{"type":"text","value":"How to Cut"},{"type":"element","tagName":"a","properties":{"href":"#how-to-cut","ariaLabel":"how to cut permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Cut from the grid is "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"enabled by default"}]},{"type":"text","value":" for enterprise users. To cut your selection to the system clipboard, you can use the keybind "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"X"}]},{"type":"text","value":", or right click on a cell and select 'Cut' from the context menu. Unless "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/range-selection"},"children":[{"type":"text","value":"Range Selection"}]},{"type":"text","value":" or "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/row-selection"},"children":[{"type":"text","value":"Row Selection"}]},{"type":"text","value":" is enabled, you will only be copying from the currently focused cell."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The cut operations will work exactly the same as the copy operations, with the addition that data will be removed from the grid afterwards, so the cut operations will use the same properties described above to customise the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"copy"}]},{"type":"text","value":" process."}]},{"type":"element","tagName":"h2","properties":{"id":"disabling-cut","style":"position:relative;"},"children":[{"type":"text","value":"Disabling Cut"},{"type":"element","tagName":"a","properties":{"href":"#disabling-cut","ariaLabel":"disabling cut permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Since "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Cut"}]},{"type":"text","value":" is a destructive process, the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"suppressCutToClipboard"}]},{"type":"text","value":" property was added to the Grid Options."}]},{"type":"element","tagName":"snippet","properties":{},"children":[{"type":"text","value":"\nconst gridOptions = {\n    suppressCutToClipboard: true\n}\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This is demonstrated in the example below. Note the following:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Selecting a cell and pressing "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"X"}]},{"type":"text","value":" will not "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"copy"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"cut"}]},{"type":"text","value":" the data."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The context menu will not show an option to "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Cut"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Clipboard Suppress Cut","name":"suppress-cut","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"menu\", \"range\", \"clipboard\"] }"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"how-to-paste","style":"position:relative;"},"children":[{"type":"text","value":"How to Paste"},{"type":"element","tagName":"a","properties":{"href":"#how-to-paste","ariaLabel":"how to paste permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Paste is enabled by default in the enterprise version and is possible as long as the cells you're pasting into are "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/cell-editing"},"children":[{"type":"text","value":"editable"}]},{"type":"text","value":" (non-editable cells cannot be modified, even with a paste operation). You can paste using the keybind "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"V"}]},{"type":"text","value":" while focus is on the grid."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The behaviour of paste changes depending whether you have a single cell or a range selected:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"When a "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"single cell is selected"}]},{"type":"text","value":". The paste will proceed starting at the selected cell if multiple cells are to be pasted."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"When a "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"range of cells selected"}]},{"type":"text","value":". If the selected range being pasted is larger than copied range, it will repeat if it fits evenly, otherwise it will just copy the cells into the start of the range."}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"div","properties":{"className":["custom-block","note"]},"children":[{"type":"element","tagName":"div","properties":{"className":["custom-block-body"]},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The 'paste' operation in the context menu is not possible and hence always disabled.\nIt is not possible because of a browser security restriction that JavaScript cannot\ntake data from the clipboard without the user explicitly doing a paste command from the browser\n(e.g. "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"V"}]},{"type":"text","value":" or from the browser menu). If JavaScript could do this, then websites could steal\ndata from the client via grabbing from the clipboard maliciously. The reason why the grid keeps\nthe paste in the menu as disabled is to indicate to the user that paste is possible and it provides\nthe shortcut as a hint to the user. This is also why the API cannot copy from clipboard."}]}]}]},{"type":"element","tagName":"h2","properties":{"id":"disabling-paste","style":"position:relative;"},"children":[{"type":"text","value":"Disabling Paste"},{"type":"element","tagName":"a","properties":{"href":"#disabling-paste","ariaLabel":"disabling paste permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can turn paste operations off for the entire grid, by setting the grid property "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"suppressClipboardPaste=true"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Or you can disable pasting for a specific column or cell by setting the property "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"suppressPaste"}]},{"type":"text","value":" on the column definition. This can be a boolean or a function (use a function to specify for a particular cell, or boolean for the whole column)."}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"column-properties/properties.json","section":"columns","names":"[\"suppressPaste\"]"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"processing-pasted-data","style":"position:relative;"},"children":[{"type":"text","value":"Processing Pasted Data"},{"type":"element","tagName":"a","properties":{"href":"#processing-pasted-data","ariaLabel":"processing pasted data permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"It is possible to process clipboard data before pasting it into the grid. This can be done either on individual cells or the whole paste operation."}]},{"type":"element","tagName":"h3","properties":{"id":"processing-individual-cells","style":"position:relative;"},"children":[{"type":"text","value":"Processing Individual Cells"},{"type":"element","tagName":"a","properties":{"href":"#processing-individual-cells","ariaLabel":"processing individual cells permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The interfaces and parameters for processing individual cells are as follows:"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"grid-options/properties.json","section":"clipboard","names":"[\"processCellForClipboard\", \"processHeaderForClipboard\", \"processGroupHeaderForClipboard\", \"processCellFromClipboard\"]"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"These three callbacks above are demonstrated in the example below. Note the following:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"When cells are copied to the clipboard, values are prefixed with 'C-'. Cells can be copied by dragging a range with the mouse and hitting "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"C"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"When cells are pasted from the clipboard, values are prefixed with 'Z-'. Cells can be pasted by hitting "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"V"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"When headers are copied to the clipboard, values are prefixed with 'H-'. Headers can be copied by using the context menu."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"When group headers are copied to the clipboard, values are prefixed with 'GH-'. Headers can be copied by using the context menu."}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Example Process","name":"process","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"menu\", \"range\", \"clipboard\"] }"},"children":[]}]},{"type":"element","tagName":"h3","properties":{"id":"processing-data-from-clipboard","style":"position:relative;"},"children":[{"type":"text","value":"Processing Data from Clipboard"},{"type":"element","tagName":"a","properties":{"href":"#processing-data-from-clipboard","ariaLabel":"processing data from clipboard permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To have complete control of processing clipboard data when pasting, you can use the callback below:"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"grid-options/properties.json","section":"clipboard","names":"[\"processDataFromClipboard\"]"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The following example shows custom code to process the data from the clipboard:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The cells are coloured based on the colour that the cell content starts with"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Copy a cell range in the grid which includes a cell value that starts with "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Red"}]},{"type":"text","value":". Pasting into the grid will paste a 4x4 cell grid with top row values "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"['Orange', 'Orange']"}]},{"type":"text","value":" and bottom row values "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"['Grey', 'Grey']"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Copy a cell range in the grid which includes a cell value that starts with "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Yellow"}]},{"type":"text","value":" and "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"doesn’t"}]},{"type":"text","value":" include any "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Red"}]},{"type":"text","value":" cell values. Pasting this copied cell range will cancel the paste action and not paste anything"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Any other copied cell data will be pasted as-is"}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Example Process Data","name":"process-all","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"menu\", \"range\", \"clipboard\"] }"},"children":[]}]},{"type":"element","tagName":"h3","properties":{"id":"pasting-new-rows-at-the-bottom-of-the-grid","style":"position:relative;"},"children":[{"type":"text","value":"Pasting new rows at the bottom of the Grid"},{"type":"element","tagName":"a","properties":{"href":"#pasting-new-rows-at-the-bottom-of-the-grid","ariaLabel":"pasting new rows at the bottom of the grid permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"By default, when pasting multiple rows near the last record shown in the grid, any rows exceeding the total number of rows shown in the grid will not be pasted."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In order to insert all the copied rows in the grid, a custom "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"processDataFromClipboard"}]},{"type":"text","value":" function is needed to add the necessary number of new rows using the "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/data-update-transactions/#transaction-update-api"},"children":[{"type":"text","value":"Transaction Update API"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The example below uses a custom "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"processDataFromClipboard"}]},{"type":"text","value":" function to add new rows to the grid, to fit all the copied rows:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Select the top 3 rows in the grid using "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Shift"}]},{"type":"text","value":" + click"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Press "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"C"}]},{"type":"text","value":" to copy the selected rows"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Select the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Ryan Lochte"}]},{"type":"text","value":" cell on the last row and press "},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"Ctrl"}]},{"type":"text","value":"+"},{"type":"element","tagName":"kbd","properties":{},"children":[{"type":"text","value":"V"}]},{"type":"text","value":" to paste the copied rows"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Notice that the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Ryan Lochte"}]},{"type":"text","value":" row has been overwritten and 2 extra rows are created at the bottom of the grid to accommodate the additional 2 rows pasted"}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Paste New Rows","name":"pasting-extra-rows","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"menu\", \"range\", \"clipboard\"] }"},"children":[]}]},{"type":"element","tagName":"h3","properties":{"id":"read-only-edit","style":"position:relative;"},"children":[{"type":"text","value":"Read Only Edit"},{"type":"element","tagName":"a","properties":{"href":"#read-only-edit","ariaLabel":"read only edit permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"When the grid is in "},{"type":"element","tagName":"a","properties":{"href":"/archive/29.3.3/value-setters/#read-only-edit"},"children":[{"type":"text","value":"Read Only Edit"}]},{"type":"text","value":" mode the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Clipboard"}]},{"type":"text","value":" will not update the data inside the grid. Instead the grid fires "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"cellEditRequest"}]},{"type":"text","value":" events allowing the application to process the update request."}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"grid-events/events.json","section":"editing","names":"[\"cellEditRequest\"]"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The example below will show how to update cell value combining the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Clipboard"}]},{"type":"text","value":" with "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"readOnlyEdit=true"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Clipboard - ReadOnlyEdit","name":"read-only-edit","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"range\", \"clipboard\"] }"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"changing-the-delimiter-for-copy--paste","style":"position:relative;"},"children":[{"type":"text","value":"Changing the Delimiter for Copy & Paste"},{"type":"element","tagName":"a","properties":{"href":"#changing-the-delimiter-for-copy--paste","ariaLabel":"changing the delimiter for copy  paste permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"By default, the grid will use "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"\\t"}]},{"type":"text","value":" (tab) as the field delimiter. This is to keep the copy / paste compatible with Excel. If you want another delimiter then you can set the property "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"gridOptions.clipboardDelimiter"}]},{"type":"text","value":" to a value of your choosing."}]},{"type":"element","tagName":"h2","properties":{"id":"using-the-browsers-text-selection","style":"position:relative;"},"children":[{"type":"text","value":"Using the browser's text selection"},{"type":"element","tagName":"a","properties":{"href":"#using-the-browsers-text-selection","ariaLabel":"using the browsers text selection permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The grid's selection and copy features replace the built-in browser behaviour for selecting and copying text. If you want to use the normal browser behaviour instead, you should set "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"enableCellTextSelection=true"}]},{"type":"text","value":" in the gridOptions. It's important to mention that this config should be combined with "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ensureDomOrder=true"}]},{"type":"text","value":" also in the gridOptions."}]},{"type":"element","tagName":"div","properties":{"className":["custom-block","note"]},"children":[{"type":"element","tagName":"div","properties":{"className":["custom-block-body"]},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This is not an enterprise config and can be used at any time to enable cell text selection."}]}]}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Using Browser text selection","name":"cellTextSelection","type":"generated"},"children":[]}]},{"type":"element","tagName":"h2","properties":{"id":"clipboard-events","style":"position:relative;"},"children":[{"type":"text","value":"Clipboard Events"},{"type":"element","tagName":"a","properties":{"href":"#clipboard-events","ariaLabel":"clipboard events permalink","className":["docs-header-icon","after"]},"children":[{"type":"element","tagName":"svg","properties":{"id":"icon","xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 32 32"},"children":[{"type":"element","tagName":"path","properties":{"d":"M29.25,6.76a6,6,0,0,0-8.5,0l1.42,1.42a4,4,0,1,1,5.67,5.67l-8,8a4,4,0,1,1-5.67-5.66l1.41-1.42-1.41-1.42-1.42,1.42a6,6,0,0,0,0,8.5A6,6,0,0,0,17,25a6,6,0,0,0,4.27-1.76l8-8A6,6,0,0,0,29.25,6.76Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M4.19,24.82a4,4,0,0,1,0-5.67l8-8a4,4,0,0,1,5.67,0A3.94,3.94,0,0,1,19,14a4,4,0,0,1-1.17,2.85L15.71,19l1.42,1.42,2.12-2.12a6,6,0,0,0-8.51-8.51l-8,8a6,6,0,0,0,0,8.51A6,6,0,0,0,7,28a6.07,6.07,0,0,0,4.28-1.76L9.86,24.82A4,4,0,0,1,4.19,24.82Z"},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The following events are relevant to clipboard operations:"}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"api-documentation","properties":{"source":"grid-events/events.json","section":"clipboard","names":"[\"pasteStart\",\"pasteEnd\"]","config":"{\"overrideBottomMargin\":\"0rem\"}"},"children":[]},{"type":"text","value":"\n"},{"type":"element","tagName":"api-documentation","properties":{"source":"grid-events/events.json","section":"editing","names":"[\"cellValueChanged\"]","config":"{ \"hideMore\":false}"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For a paste operation the events will be fired as:"}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"One "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"pasteStart"}]},{"type":"text","value":" event."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Many "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"cellValueChanged"}]},{"type":"text","value":" events."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"One "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"pasteEnd"}]},{"type":"text","value":" event."}]},{"type":"text","value":"\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If the application is doing work each time it receives a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"cellValueChanged"}]},{"type":"text","value":", you can use the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"pasteStart"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"pasteEnd"}]},{"type":"text","value":" events to suspend the applications work and then do the work for all cells impacted by the paste operation after the paste operation."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"There are no events triggered by copy to clipboard as this does not change the grid's data."}]},{"type":"element","tagName":"div","properties":{},"children":[{"type":"element","tagName":"grid-example","properties":{"title":"Clipboard Events","name":"clipboard-events","type":"generated","options":"{ \"enterprise\": true, \"modules\": [\"clientside\", \"menu\", \"range\", \"clipboard\"] }"},"children":[]}]}]},"frontmatter":{"title":"Clipboard","version":null,"enterprise":true,"sideMenu":null,"description":null},"headings":[{"id":"how-to-copy","depth":2,"value":"How to copy"},{"id":"copying-cell-ranges","depth":2,"value":"Copying Cell Ranges"},{"id":"copying-rows","depth":2,"value":"Copying Rows"},{"id":"mixed-copying-cell-ranges--rows","depth":2,"value":"Mixed Copying Cell Ranges & Rows"},{"id":"custom-clipboard-interaction","depth":2,"value":"Custom clipboard interaction"},{"id":"copying-via-the-api","depth":2,"value":"Copying via the API"},{"id":"how-to-cut","depth":2,"value":"How to Cut"},{"id":"disabling-cut","depth":2,"value":"Disabling Cut"},{"id":"how-to-paste","depth":2,"value":"How to Paste"},{"id":"disabling-paste","depth":2,"value":"Disabling Paste"},{"id":"processing-pasted-data","depth":2,"value":"Processing Pasted Data"},{"id":"processing-individual-cells","depth":3,"value":"Processing Individual Cells"},{"id":"processing-data-from-clipboard","depth":3,"value":"Processing Data from Clipboard"},{"id":"pasting-new-rows-at-the-bottom-of-the-grid","depth":3,"value":"Pasting new rows at the bottom of the Grid"},{"id":"read-only-edit","depth":3,"value":"Read Only Edit"},{"id":"changing-the-delimiter-for-copy--paste","depth":2,"value":"Changing the Delimiter for Copy & Paste"},{"id":"using-the-browsers-text-selection","depth":2,"value":"Using the browser's text selection"},{"id":"clipboard-events","depth":2,"value":"Clipboard Events"}]}},"pageContext":{"frameworks":["javascript","react","angular","vue"],"framework":"angular","srcPath":"/clipboard","pageName":"clipboard"}},
    "staticQueryHashes": ["1766026005","699667431","940729948"]}