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.

Delete row using delete key

Thread ID:

Created:

Updated:

Platform:

Replies:

45230 Jun 14,2006 07:33 PM Jun 15,2006 01:00 PM Windows Forms 2
loading
Tags: Grouping
Prem
Asked On June 14, 2006 07:33 PM

Is there an easy way to delete row from the Grid grouping Control when the user hits the delete key on the keyboard after highlighting one or more rows. The current cell seems to receive the delete event even thought the entire row is highlighted. Thanks, Prem

Administrator [Syncfusion]
Replied On June 14, 2006 11:39 PM

Hi Prem, Try this code to delete the current record 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 ) { e.TableControl.Table.CurrentRecord.Delete(); e.Inner.Handled = true; } } Let me know if this helps. Best Regards, Haneef

Prem
Replied On June 15, 2006 01:00 PM

It worked. Thanks Haneef. Prem >Hi Prem, > >Try this code to delete the current record 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 ) > { > e.TableControl.Table.CurrentRecord.Delete(); > e.Inner.Handled = true; > } >} > >Let me know if this helps. >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.

;