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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Delete row using delete key

Thread ID:

Created:

Updated:

Platform:

Replies:

45230 Jun 14,2006 11:33 PM UTC Jun 15,2006 05:00 PM UTC WinForms 2
loading
Tags: Grouping
Prem
Asked On June 14, 2006 11:33 PM UTC

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 15, 2006 03:39 AM UTC

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 05:00 PM UTC

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.

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

;