Can't delete any selected records

Hi Everyone 
I have this situation where I can update the data in my entity from the GridGroupingControl but for some reason when I am deleting selected rows of data it does not delete the record in the entity 

What am  I doing wrong because it was working and I just updated the controls to the newer versions 

Regards

1 Reply

AR Arulpriya Ramalingam Syncfusion Team January 23, 2018 10:08 AM UTC

Hi Pierre,  
  
Thanks for contacting Syncfusion support.  
  
As per the GridGroupingControl current support, the changes of records will be updated/reflected in the underlying data base when the entity framework implements theINotifyPropertyChanged interface. So, we request you to ensure that the INotifyPropertyChanged is implemented in the entity class. We have created a simple sample to delete the selected records from the grid and underlying data source and the records are deleted properly. Please make use of the below code and sample to delete the records,  
  
Code example  
  
//To select the records  
gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.One;  
  
//Event Customization  
private void deleteBtn_Click(object sender, EventArgs e)  
{  
    //To check for SelectedRecords  
    if (gridGroupingControl1.Table.SelectedRecords.Count > 0)  
    {  
        //To delete the records from grid  
        gridGroupingControl1.Table.SelectedRecords.DeleteAll();  
       //To delete particular selected record from grid  
        gridGroupingControl1.Table.SelectedRecords[index].Delete();  
  
    }  
}  
   
  
Note  
Please let us know your Syncfusion product version and the way of populating data to the grid, if we misunderstood your scenario. Moreover, refer the attached sample and let us know, if we missed anything from your customization which causes the issue. So that, we could analyze further and provide you a better solution at the earliest.  
  
Regards,  
Arulpriya  


Loader.
Up arrow icon