We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Problem deleting selectedRecords

Thread ID:

Created:

Updated:

Platform:

Replies:

126303 Oct 6,2016 08:47 AM Oct 7,2016 03:29 AM Windows Forms 1
loading
Tags: GridGroupingControl
Pierre Smith
Asked On October 6, 2016 08:47 AM

Hi There I hope someone can help me
For some reason when I select lets say 10 items in my grid. And I then delete those records by using  
_grid.Table.SelectedRecords.DeleteAll();
then the first 8 records would delete correctly but the last 2 selected records would jump down a few rows to some other records and delete those records 

Can anyone help please 



Piruthiviraj Malaimelraj [Syncfusion]
Replied On October 7, 2016 03:29 AM

Hi Pierre, 
 
Thanks for using Syncfusion products. 
 
We had analyzed your query. We suspect that you are using BindingList datasource. If you are using BindingList datasource in your application, ListChangedEventHandler must be triggered with ListChangedType as ItemDeleted in RemoveAt() method of IBindingList. Please make use of the below code, 
 
Code example 
public event System.ComponentModel.ListChangedEventHandler ListChanged; 
 
public void RemoveAt(int index) 
{ 
    list.RemoveAt(index); 
    RaiseListChanged(ListChangedType.ItemDeleted, index); 
} 
 
void RaiseListChanged(ListChangedType type, int index) 
{ 
    if (ListChanged != null) 
        ListChanged(this, new ListChangedEventArgs(type, index)); 
} 
 
Sample link 
 
KB link 
 
Note 
If you are using any other datasource, can you please provide the simple sample. So that we can provide solution at the earliest. 
 
Please let us know if we misunderstood anything. 
 
Regards, 
Piruthiviraj

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;