SMART datagrid v.1 > Classes > EditOptions
Callback function which converts the text to field value when pasting the text of clipboard to data cell.
It takes precedence over the conversion format properties like EditOptions.pasteDatetimeFormats. If specify ValueColumn.pasteCallback of column, this property will be ignored.
Defaults to null.
grid.setOptions({
edit: {
pasteCallback: function (row, column, field, text) {
if (field.fieldName() == 'amount') {
return text ? parseFloat(text) : 100;
}
return field.readValue(text);
});
}
});
grid.setEditOptions({
pasteCallback: function (row, column, field, text) {
if (field.fieldName() == 'amount') {
return text ? parseFloat(text) : 100;
}
return field.readValue(text);
});
});
grid.editOptions().setPasteCallback(function (row, column, field, text) {
if (field.fieldName() == 'amount') {
return text ? parseFloat(text) : 100;
}
return field.readValue(text);
});