Accepted way to set dirty flag via javascript

3 posts, 0 answers
  1. Marc
    Marc avatar
    128 posts
    Member since:
    Jul 2010

    Posted 02 Jun 2016 Link to this post

    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. Marc
    Marc avatar
    128 posts
    Member since:
    Jul 2010

    Posted 02 Jun 2016 Link to this post

    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.
  3. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2062 posts

    Posted 06 Jun 2016 Link to this post

    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!
     
Back to Top