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

Clearing the Cell Modified Indicators

1 Answer 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 15 May 2016, 01:51 PM

I have a page where the update is put in motion using a custom button click that resides in the Kendo Toolbar.

The editing is done using GridEditMode.InCell and everything is working for the update but at the end of the process the little red triangle is remaining in the modified cells.

 

I have tried the following to clear them but it is not working:

....
grid.dataSource.read();
resetGridDirtyIndicators();
...

function resetGridDirtyIndicators (){
             
            var grid = $('#Grid').data().kendoGrid;
            var $gridData = grid.dataSource.data();
 
            for (var i = 0; i < $gridData.length; i++) {
                
                var row = grid.tbody.find("tr[data-uid='" + $gridData[i].uid + "']");
                var cell = row.find("td:eq(" + $gridData[i].ColumnIndex + ")");
 
                if (cell.hasClass("k-dirty-cell")) {
                    debugger;
                cell.removeClass("k-dirty-cell");
            }
          }
        }

 

Any Help would be greatly appreciated.

Thanks,

Reid

1 Answer, 1 is accepted

Sort by
0
Accepted
Radoslav
Telerik team
answered on 17 May 2016, 08:53 AM
Hi Reid,

Based on the provided information is hard to say why you received the described behavior. I tried to reproduce it on my side but to no avail. On the following link I created a small example which shows that after calling the dataSource.read() function the red triangles are removed:
http://dojo.telerik.com/ecunO

Please check it out and let me know what differs in your case.

Looking forward for your reply.

Regards,
Radoslav
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Reid
Top achievements
Rank 2
Answers by
Radoslav
Telerik team
Share this question
or