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

Dirty flag remains when the user reverts the changes manually before saving

1 Answer 236 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kaan
Top achievements
Rank 1
Kaan asked on 01 Feb 2019, 03:49 PM

Hi!

Example: https://demos.telerik.com/aspnet-core/grid/editing

When the user changes the first product name from "Chai" to "Chai2", and then back again to "Chai" without clicking on "Save changes", the dirty flag stays visible, and unchanged data is transferred to the server when clicking on "Save changes".

Is it possible to change this grid editing behaviour? In comparison, in inline editing mode, data is sent to the server when clicking on "Update" only when the data has really changed.

 

Best regards,

Kaan

1 Answer, 1 is accepted

Sort by
0
Accepted
Tsvetomir
Telerik team
answered on 06 Feb 2019, 12:15 PM
Hi Kaan,

When the "InCell" editing mode of the Kendo UI Grid is used and a change occurs to any of the data items, they are added to the dirtyFields object. Also, the k-dirty-cell class is added. Currently, there is not an automatic process which deletes the modified field from the object, hence, the flag will be applied even though the value has not been changed.

We have created a Knowledge Base article which covers in details how to handle this scenario and remove the dirty indicator:

https://docs.telerik.com/kendo-ui/knowledge-base/grid-remove-dirty-indicator-when-value-is-original-state

Let me know in case additional clarifications are needed.


Kind regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Kaan
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Share this question
or