Unplanned
Last Updated: 08 Dec 2020 14:22 by ADMIN
CDK
Created on: 07 Jan 2020 20:27
Category: Grid
Type: Bug Report
1
Marking 2nd last record for deletion in Batch Mode breaks Grid functionality

See online demo:

https://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

 

Steps to reproduce (seen in Chrome and Edge):

- Click the "x" on the 2nd to last record on page 1 to mark it for deletion  (Click "OK" at the prompt)

- Click "Add new record" button

 

Observe:

 - the record marked for deletion moves up by one record (but fortunately it appears the correct record will actually get deleted upon Saving)

 - a blank new record is creating correctly

 

If you repeat this procedure but choose a different record for deletion you can see it is functioning correctly.

 

I am seeing the same behaviour in my own project.

3 comments
ADMIN
Doncho
Posted on: 08 Dec 2020 14:22

Hello,

This issue is still replicable with RadGrid in Batch edit mode. Therefore I am opening this item for further planning.

Basic set up to reproduce:

<telerik:RadGrid AllowSorting="true" ID="RadGrid1" runat="server" AllowPaging="True" Width="800" OnNeedDataSource="RadGrid1_NeedDataSource"
PageSize="3" AutoGenerateDeleteColumn="true">
<MasterTableView AutoGenerateColumns="true" DataKeyNames="ID" EditMode="Batch" CommandItemDisplay="Top">
    <BatchEditingSettings HighlightDeletedRows="true" />
</MasterTableView>
</telerik:RadGrid>
C# code
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    (sender as RadGrid).DataSource = Enumerable.Range(1, 20).Select(x => new Item{ ID = x, Name = "Name " + x });
}

public class Item
{
    public int ID { get; set; }
    public string Name { get; set; }
}

Unexpected behavior - http://somup.com/cYljI8203Z

Kind regards,
Doncho
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/.

ADMIN
Eyup
Posted on: 14 Jan 2020 07:34

Hi Colter,

 

I believe this is related to the following bug:
https://feedback.telerik.com/aspnet-ajax/1448215-haschanges-method-clears-flags-for-deleting-records

I hope the workaround provided there will resolve this issue as well. If you have any remaning issues, you can continue the technical discussion over the open support thread on the same matter. Meanwhile, I will close this feedback item and relate it to the other one.

 

Regards,
Eyup
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
CDK
Posted on: 08 Jan 2020 14:30

edit: 

- a blank new record is creating INCORRECTLY