You can copy the data cell area of the grid and paste it in the system clipboard, or get the text from the clipboard and paste it in the grid. It is to use ctrl+c and ctrl+v key entry event in the browser, and does not provide a function to approach the clipboard without the user input. When the user pressed ctrl+c keys, in order to copy the selected data cell area of the grid to the system clipboard, copyEnabled property of grid editOptions should be set as true first. At this point, if singleCopy is true, you can only copy the value of Focused Cell rather than the entire selected area.
The default value is true. The default value is false.
When transfer the field value which is not TEXt to the clipboard, you can specify the converting string in various ways. First, you can specify copyCallback in each column. In the example, it has been set in "Interest Rate" column.
col.setCopyCallback(function (row, field, value) {
return '$' + value;
};
And, you can also specify the callback function in copyCallback of GridBase.editOptions.
grid.setEditOptions({
copyCallback: function (row, field, value) {
if (field.fieldName() == "amount") {
return '$' + value;
}
return value;
};
});
If copyCallback is specified in the column, copyCallback of editOptions will be ignored. Instead of copyCallback, EditOptions.copyNumberFormat, copyDatetimeFormat, copyBooleanFormat will be used as a conversion format when each field value is being converted to a string.
If these conversion formats are not specified and editOptions.useStyleFormats are specified as true, GridStyles.numberFormat, datetimeFormat, booleanFormat settings will be used.
The default value is true. You can test it in "Original Amount" and "First Date" columns.