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.

A couple of questions about GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

61410 May 25,2007 03:00 AM May 25,2007 11:51 AM Windows Forms 1
loading
Tags: GridControl
c4p
Asked On May 25, 2007 03:00 AM

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

haneefm [Syncfusion]
Replied On May 25, 2007 11:51 AM

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

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.

;