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.
Up arrow icon