To enable the possibility to copy/paste DataTable data by the CTRL+C/CTRL+V keyboard shortcuts you should use parameter clipboard.
The parameter can have the following values:
Each of the types has its specificity and define its behavior of copying.
Setting the desired behavior of copying
webix.ui({
view:"datatable",
clipboard:"selection",
});
Related sample: Copying between Grids
It's the default type and can be also specified by setting the true value.
It's can be characterized as follows:
Related sample: 'Block' Copying
Related sample: 'Selection' Copying
Related sample: 'Repeat' Copying
The "custom" value allows you to specify a custom logic for the paste operation.
To apply a custom "paste" behavior to the datatable, you need to:
grid = webix.ui({
view:"datatable",
clipboard:"custom"
});
This command will cancel the predefined behavior for the paste operation.
//the code does nothing but alerts messages
grid.attachEvent("onPaste", function(text) {
webix.message("Custom paste behavior: " + text);
});
DataTable invokes the onPaste event when the user presses CTRL+V keys combination.
Related sample: Custom Clipboard (Datatable)
Back to top