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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Deleting a row in GridGroupingControl

Thread ID:





57909 Mar 13,2007 09:00 PM UTC Mar 14,2007 04:58 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On March 13, 2007 09:00 PM UTC

I am having difficulties when deleting a row from the grid. I use a checkbox to determine if a row is selected. If it is selected and I click delete I remove the row with the below code. Now if I don't persist the datatable at this point using AcceptChanges it breaks the second function below that I use to get the selected line in the grid.


This line returns the proper index in the datatable if there are no deleted rows. Once a deleted row is in the datatable it shifts all the indexes in the datatable but technically the indexes haven't changed because the datatable only has them marked to delete.

Is there a way I can get the index to the datatable without accepting changes on the datatable?

for (int i = 0; i < this.ggcDWP.Table.Records.Count; i++)
DataRowView drv = (DataRowView)this.ggcDWP.Table.Records[i].GetData();
DailyWeightingPatternDataSet.DWP_PARENTRow drw = (DailyWeightingPatternDataSet.DWP_PARENTRow)drv.Row;
if (bool.Parse(drw.selected.ToString()))
drw.selected = "False";
this.ggcDWP.NumberCheckedItems = 0;

private void ggcDWP_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
if (e.Action == CurrentRecordAction.EnterRecordComplete
&& e.Record is GridRecord)
GridRecord gr = (GridRecord)e.Record;
int index = e.Table.UnsortedRecords.IndexOf(gr);
if (this.evntSelectionChanged != null)

Administrator [Syncfusion]
Replied On March 14, 2007 04:58 PM UTC

Hi Mike,

We are really sorry for the delay in responding. We have tested the mentioned issue. We could not reproduce the issue here. Could you please provide us a sample having the issue? This will help us to resolve the issue soon.

Thanks for choosing Syncfusion products.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon