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
close icon

Delete the row of GDBC

hi

how do i delete the entire row for a EDITABLE GDBC when user press the "Delete" button on the keyboard?


1 Reply

AD Administrator Syncfusion Team September 6, 2006 12:39 PM UTC

Hi Lim,

Try this code to delete the record in the grid using CurrentCellKeyDown.

this.gridDataBoundGrid1.EnableRemove = true;
private void GCurrentCellKeyDown(object sender, KeyEventArgs e)
{
GridCurrentCell cc = this.grid.CurrentCell;
if( e.KeyData == Keys.Delete && !cc.IsEditing )
{
this.grid.DeleteRecordsAtRowIndex(cc.RowIndex,cc.RowIndex);
e.Handled = true;
}
}

Thanks,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon