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

A couple of questions about GGC

Hello, I have a couple of questions about GridGrouping control.

I have GridGrouping bounded to DataSet, so I can view/edit the data in hierarchical view.

Does GGC has RowDeleteing event? I want to catch it and delete all selected rows.

I want rows deleted by "Delete" key when it is selected. I don't understand why, but I can't customize grid to do so.

Best Regards

1 Reply

HA haneefm Syncfusion Team May 25, 2007 03:51 PM UTC

Hi C4p,

You can try this code snippet to delete the selected records using Delete key. Please find the code snippet below.

private void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlKeyEventArgs e)
{
if( Keys.Delete == e.Inner.KeyData && !e.TableControl.CurrentCell.IsEditing )
{
foreach(SelectedRecord srec in e.TableControl.Table.SelectedRecords)
srec.Record.Delete();
e.Inner.Handled = true;
}
}

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon