Copy-pasting data
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 one of 3 values:
- 'block' ( or true. It's the default value);
- 'selection';
- 'repeat'.
Each of the types has its specificity and define its behavior of copying.
Setting the desired behavior of copying
grid = new webix.ui({
view:"datatable",
...
clipboard:"selection",
});
Related sample: Copying between grids
'Block' copying
It's the default type and can be also specified by setting the true value.
It's can be characterized as follows:
- When the copy area is less than the one selected, copied cells are not repeated and fill only the related selected cells.
- When the copy area is greater than the one selected, copied cells fill not only the selected area but also the related cells nearby.
Related sample: 'block' copying
'Selection' copying
- When the copy area is less than the one selected, copied cells are not repeated and fill only the related selected cells.
- When the copy area is greater than the one selected, copied cells fill only the selected area and don't 'touch' the cells nearby.
Related sample: 'selection' copying
'Repeat' copying
- When the copy area is less than the one selected, copied cells are repeated a specific number of times to fill the selected cells.
- When the copy area is greater than the one selected, copied cells fill only the selected area and don't 'touch' the cells nearby.
Related sample: 'repeat' copying
Back to top