Ensure that a cell is not marked as dirty if its value matches the original value in batch edit while using Custom validator

I am using batch editing and custom validation. 

I track original cell values in my model so it's available in the custom validator. If a cell’s original value is changed and user sets it back to original value, I want the grid to treat it as undirty. 

Is there a way to hook into the grid’s dirty state logic in the custom validator so I can reset it if the cell value matches the original?

For example: I'll demonstrate this by editing PM Time of 7/10/2025.

I change it to 15. It shows the cell dirty as expected.

I change it back to its original value. But it still shows it as dirty. This is not what I want.

I want to reset that dirty state because it matches with the original value.


Here's the full sample I created for this question that you can see and run. My validation is done in custom validator where I validate edited cells.

https://blazorplayground.syncfusion.com/VtBSNQKDdfCPPyVh

Please route this ticket to some senior engineer in the data grid team as this might require expertise. 

Thank you for the help!


5 Replies

SK Sanjay Kumar Suresh Syncfusion Team August 4, 2025 04:58 PM UTC

Hi Ashish Khanal,


After evaluating the feasibility of your requirement, we regret to inform you that it is currently not achievable.


We understand this might be disappointing, and we appreciate your understanding. If you have any alternative approaches or workflows in mind, we’d be happy to explore them together.


Regards,

Sanjay Kumar Suresh



AK Ashish Khanal August 4, 2025 11:15 PM UTC

Hi Sanjay,

Thank you for your response.

It is indeed disappointing to hear that resetting the dirty state when a cell's value matches its original value is not currently supported. This feels like a fundamental feature, especially for a flagship control like the DataGrid, and I had expected it to be available.


I kindly request that you add this to your feature backlog and consider prioritizing it. 

I believe many of your customers working with grid editing would find this capability highly valuable.


If you have any alternative approaches or workflows in mind, we’d be happy to explore them together.

I'd be happy to explore any suggestions you might have. However, without access to an API or hook that allows resetting the dirty state manually, I’m currently unable to find a viable workaround.



SK Sanjay Kumar Suresh Syncfusion Team August 7, 2025 11:51 AM UTC

Hi Ashish Khanal,


Since the tried workarounds doesn’t get supported to achieve the above requirement. We have considered your request as an improvement “Need to provide support to clear the IsDirty cell if existing content is saved during the Batch edit mode.” At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest and this improvement will be included in any of our upcoming release.


You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.


Need to provide support for undo changes after performing Batch Edit in Blazor | Feedback Portal

Regards,

Sanjay Kumar Suresh



AK Ashish Khanal August 7, 2025 11:28 PM UTC

Hi Sanjay,

Thank you for putting it as a request.

Your link takes me to page about undoing changes in batch edit and not to about clearing IsDirty property in Batch edit.

Hopefully it gets implemented soon.

Thanks.



NP Naveen Palanivel Syncfusion Team August 11, 2025 04:35 AM UTC

Hi Ashish Khanal,

The above feature request includes two distinct enhancement requirements.

Case 1 : Need to provide support for undo changes after performing Batch update.

Introduce comprehensive undo functionality during batch editing in the Blazor Grid to improve user experience 

Undo Individual Cell Changes: Allow reverting changes made to specific cells within a batch edit session.

Undo Entire Row Changes: Enable users to reset changes for a particular row back to its original state.


Undo All Changes: Provide an option to revert all changes made during the current batch edit session.


Configurable Undo Support: Introduce an option to enable or disable undo functionality at the grid level.


Integration with Toolbar: Add "Undo" and "Redo" buttons to the grid toolbar for user-friendly operation.


Keyboard Shortcuts: Support common undo/redo keyboard shortcuts (e.g., Ctrl+Z for Undo, Ctrl+Y for Redo).

Case 2 : Need to provide support to clear the IsDirty cell if existing content is saved during the Batch edit mode.

Improve the handling of the IsDirty state in batch edit mode: When a cell is edited and marked as dirty (e.g., highlighted with a green color), and the user manually reverts the cell value back to its original content before saving, the grid should automatically clear the IsDirty state for that cell.

Regards,
Naveen


Loader.
Up arrow icon