I have a Kendo UI spreadsheet and defined validations to columns. Validations are working when I enter data manually in the sheet. But if I do a Copy paste from Excel, the validations are not working. Any help on this is highly appreciated
$(function () {
$("#spreadsheet").kendoSpreadsheet({
// excel: {
// // Required to enable saving files in older browsers
// proxyURL: "//demos.telerik.com/kendo-ui/service/export"
// },
columns: 25,
// headerHeight: 0,
// headerWidth: 0,
toolbar: false,
// formulabar: false,
sheetsbar: false,
sheets: [
{
rows: [
{
height: 30,
cells: [
{
value: "Column1", background: "rgb(204,204,204)", textAlign: "center", color: "rgb(255,0,0)", bold: "true", fontName: "Arial"
},
{
value: "Column2", background: "rgb(204,204,204)", textAlign: "center", color: "rgb(255,0,0)", bold: "true", fontName: "Arial"
},
{
value: "Column3", background: "rgb(204,204,204)", textAlign: "center", color: "rgb(255,0,0)", bold: "true", fontName: "Arial"
}
]
}
],
columns: [
{
width: 80
},
{
width: 115
},
{
width: 115
}
]
},
{
name: "ListValues",
rows: [ //A2:A1001
{
cells: [
{
value: 'I'
},
{
value: 'C'
}
]
}
]
}
]
});
//Get the column range
var range = $("#spreadsheet").data("kendoSpreadsheet").activeSheet().range("A2:A1001");
//Apply the validation rule
range.validation({
dataType: "list",
from: "ListValues!A$1:B$1",
allowNulls: false,
type: "reject",
titleTemplate: "Invalid Value",
messageTemplate: "Column1 valid values are 'C' and 'I'."
});
});