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

Backspace key

Thread ID:





60887 May 14,2007 09:02 PM UTC May 15,2007 10:24 PM UTC WinForms 1
Tags: Grouping
Natalija Ilic
Asked On May 14, 2007 09:02 PM UTC

I have AutoComplete comboBox inside GridGrouping Control. When the cursor is inside the field it seems that Backspace and Delete doesn't work like with other text fields.
Do I need to override TableControlCurrentCellKeyDown event for Backspace and Delete keys? Do you have any examples?

Thanks a lot.

haneefm [Syncfusion]
Replied On May 15, 2007 10:24 PM UTC

Hi Natalia,

This can achieved by handling the CurrentCellKeyDown event and accordingly the Delete key is processed for the combobox cell to resolve this issue. The following is the code snippet.

private void gridTableControlCurrentCellKeyDown(object sender,GridTableControlKeyEventArgs e)
GridCurrentCell cc =e.TableControl.CurrentCell;
if(cc.Renderer.StyleInfo.CellType == GridCellTypeName.ComboBox )
if(e.KeyCode == Keys.Delete || e.KeyCode == Keys.Back)
e.Inner.Handled = true;
GridDropDownEditPartControl editControl = cc.Renderer.Control as GridDropDownEditPartControl;
int len = ( editControl.SelectionLength > 0 )? editControl.SelectionLength : 1;
int start = editControl.SelectionStart;
if( ( editControl.SelectionStart + len ) <= editControl.Text.Length)
cc.Renderer.ControlText = cc.Renderer.ControlText.Remove( editControl.SelectionStart,len);
editControl.SelectionStart = start;

Also refer this forum thread for more details.

Best Regards,


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

or the page will be automatically redirected to 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