If you just want to remove the row from the grid, then it is just
grid.Rows.Remove (row)
If you want to delete the datarow as well then the way I do it (not guaranteed
to be the best as I know nothing) is
DataGridViewRow row; // to be deleted
DataRowView drv = (DataRowView) row.DataBoundItem;
MyDataRowType dr = (MyDataRowType) drv.Row;
tableAdapter.MySQLDeleteFunc ( dr.key,...)
grid.Rows.Remove (row)
myTable.AcceptChanges ();
Rodrigo Ferreira wrote:
Hi
How can i delete a row from a datagrid with code? I want the same efectt
that when i click in delete key.
Greetings