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

Losing dirty flag on edited items when I click Add new Item

4 Answers 203 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 14 Aug 2013, 04:16 PM
I have a kendoui grid setup and doing inCell edits. I have a button at the top to 'Add a new item'.  If I edit a couple of items they little red corners appear so I know they are dirty. If I then click the 'Add new item' button at the top of the grid, it removes the red flags from the edited items.  This is misleading and causes the user to think the only record that is dirty is the record they inserted to the grid. 


To reproduce:
Run the page attached.
Edit an item or 2 in the grid, but don't save.
They have little red flags in corners to show they are dirty.
Click Add new record button at top of grid.
The red flags disappeared from the dirty items.

How do I fix this?


I'm attaching files for the view and controller (using ASP.net MVC4).

Thank you in advance

4 Answers, 1 is accepted

Sort by
0
Brian Roth
Top achievements
Rank 1
answered on 15 Aug 2013, 05:18 PM
I'm experiencing this too.  I just tested on the Batch editing page in the online demos and it has the same behavior, so it appears to be an issue with the kendo source code.  Hopefully they'll be able to figure out the problem and post an internal build in the next couple of weeks with a fix.

Regards,
Brian
0
Vladimir Iliev
Telerik team
answered on 16 Aug 2013, 07:18 AM
Hi Marc,

 
Please note that preserving the dirty marks after redrawing the grid rows (when adding new row) currently is not supported, however we already provide example in our CodeLibrary which demonstrates how to achieve the desired behavior:

Kind Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Brian Roth
Top achievements
Rank 1
answered on 20 Aug 2013, 05:14 PM
Hi Vladimir,

Thanks for the information.  Is this something that will be supported in the future?  It's more of an annoyance for our users than anything else, but they can live with it for the time being.  We use the grids pretty extensively already in our application and it will take a lot of time and effort to add templates for all of the columns to handle this scenario, so I'm hoping to avoid that if it's something that may be part of standard Kendo functionality at some point.

Thanks,
Brian
0
Vladimir Iliev
Telerik team
answered on 21 Aug 2013, 06:41 AM
Hi Marc,

 
Currently this functionality is not build into the KendoUI grid as it will significantly drop the performance (each model property should it's own dirty field), however if you believe that this functionality should be included I would suggest to share your idea at KendoUI UserVoice to allow other users vote for it. Most voted ideas are included in next KendoUI releases.

Kind Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
Marc
Top achievements
Rank 1
Answers by
Brian Roth
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or