Hello,
I want to remove a row from the grid, I remove it from the DataSet but it doesn't refresh in the grid. How do I make the grid update after deleting a row in the DataSet?
Is there a better way to do it? Maybe deleting the row in the grid?
What is the best strategy to do it?
I only want to do this in memory, since the update in the database is done with ADO and SQL statements.
Best regards.
My code:
DataRow[] drr = dsHojaCalculo.Tables[0].Select("key_guid = '"+ esteAEliminarGuid+ "' ");
foreach (var fila in drr)
{
fila.Delete();
dsHojaCalculo.Tables[0].AcceptChanges();
}
gridHc.DataSource = null;
gridHc.DataSource = dsHojaCalculo.Tables[0];