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

Accepted way to set dirty flag via javascript

2 Answers 1307 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 02 Jun 2016, 02:30 PM

I have a grid with incell editing with batch update set to true.

I have a custom command that synchronizes the data off two columns like this:

 

command.Custom("Sync Dates").Click("syncDates");

 

    function syncDates(e) {
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
        dataItem.set("Date1", dataItem.Date2);
    }

 

 

What is the best way to set the dirty flag on the Date1 cell?

2 Answers, 1 is accepted

Sort by
0
Marc
Top achievements
Rank 1
answered on 02 Jun 2016, 03:01 PM
I should clarify that I just want the grid UI to refresh to reflect the css (red icon class) that the dataitem is actually dirty.
0
Boyan Dimitrov
Telerik team
answered on 06 Jun 2016, 08:47 AM

Hello Marc,

The Preserve Dirty Indicator in Incell Editing and Client Operations example demonstrates how to set a dirty indicator to the column cell. I believe that same approach can be used for your scenario as well. 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Marc
Top achievements
Rank 1
Answers by
Marc
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or