Following is my grid.
$("#grid").kendoGrid({
selectable: "single cell",
allowCopy: true,
change: function(e) {
var selected = this.select();
var row = this.select().closest("tr");
selectedRow = this.dataItem(row);
deselectSelection();
},
excel: {
fileName: "Report.xlsx",
allPages:true,
filterable: true
},
dataSource: {
schema: {
model: {
fields: columnSchemaModel
}
},
transport: {
read: function (e) {
e.success(reportList);
}
},
pageSize: 500,
aggregate: aggregateList,
change: function(e) {
var dataSource = this;
if (typeof dataSource.filter() != "undefined") {
app.fltrButton.enabled = true;
}
}
....
I am trying to capture datasource change when filter by column. Change function fires as expected. ' app.fltrButton.enabled = true; ' is a variable of button class. If it set to true, css class of button changes. However it doesn't get effect unless I click on another parallel button. So it's the html that doesn't get update, not the value. Please provide a suggestion.