This is a migrated thread and some comments may be shown as answers.

CSS changes done from Change function in data source, doesn't effect

1 Answer 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Luke
Top achievements
Rank 1
Luke asked on 12 Aug 2016, 08:03 AM

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.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 19 Aug 2016, 06:46 AM
Hello Luke,

The provided information does not give definite clues about what is the issue. Can you please provide a simple Dojo test page for inspection? Thank you.

http://dojo.telerik.com/

You can use any of our online Grid demos as a starting point by clicking on the blue "Edit this example" button below the Grid.

http://demos.telerik.com/kendo-ui/grid/remote-data-binding

Regards,
Dimo
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Luke
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or