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

GridGrouping Deleting text value cell.

Hi,

If user is entering text value in this grid cell and selects some portion of writen text and press DELETE button, he expects to delete the selected portion of text.

if he has not selected some portion of text and press DELETE button then whole written text should be deleted.

For eg. he types 'AMOLCHOUDHARI', he may select HARI by shift button and DELETE or he may want to delete whole text by pressing DELETE button.

Please help!

Thanks,
Amol Choudhari

Which event is helpful for this. H

1 Reply

HA haneefm Syncfusion Team August 6, 2007 06:29 PM UTC

Hi Amol,

You can handle the TableControlCurrentCellKeyDown event and set ControlText to string.Empty when the DELETE key is pressed. Below is a code snippet

void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
{
if (e.Inner.KeyCode == Keys.Delete)
{
e.Inner.Handled = true;
e.TableControl.CurrentCell.Renderer.ControlText = string.Empty;
}
}

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon