Cancel Changes button in MVC Grid deletes new entries (Batch Editing demo)

1 Answer 42 Views
Grid
Richard
Top achievements
Rank 1
Richard asked on 01 Feb 2022, 04:55 PM

I'm trying to implement the Batch Editing functionality based on the following demo page:

ASP.NET MVC Grid Batch editing Demo | Telerik UI for ASP.NET MVC

Why are new (saved) records deleted when the Cancel Changes button is selected? Is the intended behavior? 

To recreate:

1) Update an existing record.
2) Click Add New Record and create a new record.
3) Click Save Changes. 
4) Click Cancel Changes. The updated record retains the new values. The new record(s) are deleted.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 04 Feb 2022, 03:13 PM

Hi Richard,

 

Thank you for writing to us.

This happens because the Cancel button rebinds the grid and the newly added record goes to the last page. So it isn't actually getting deleted, but visually vanishing just to the last row.

You can verify that by doing the following:

1. Open the same demo
2. Sort the ProductName column
3. Do the same described steps
4. You will see that the issue is resolved:

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or