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

Custom Editor - dirty cell flag disappears

1 Answer 165 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 03 Jan 2013, 02:25 PM

It is found that when using a custom editor (in my case a Kendo dropdown menu), the dirty flag sometimes disappears even though the cell and model are still considered 'dirty'.

This behavor is reproducible using your demo (http://demos.kendoui.com/web/grid/editing-custom.html). Follow the steps to view the error:

  • Select a different value under Category for a row
  • Select the Product Name cell in the same row (a different row will also work) to enable edit mode
  • Click back to the dirty Category cell
  • Click off to close cell

The dirty flag in the cell is now gone. The same behavor is happening with my implementation even though I have not saved the current grid. If you press "Cancel", the value is returned to the original.

Please advise.

1 Answer, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 07 Jan 2013, 02:10 PM
Hello Jon,

The observed behavior is due to the autoSync: true configuration of the DataSource. In order to get the dirty flag to remain until the save button is clicked you should set the value to false. I.e.: 
var dataSource = new kendo.data.DataSource({
   //....
   autoSync: false
});
 
Kind regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Jon
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Share this question
or