U
Uhane
I have a windows form with the datagridview that displays data from a
single table. The underlying data can be updated/deleted from another
component.
In our case, we raise an event when any underlying changes happen. We
then have been trying to refresh our grid without much luck.
We use:
this.DataSet.Offers.Clear();
this.offersTableAdapter.Fill(this.DataSet.Offers);
this.offersBindingSource.ResetBindings(false);
this.offersDataGridView.Refresh();
We have tried multiple variations but the underlying data is fairly
small. Unfortunately, if a row is deleted often the grid will then
think that two rows have been deleted. If the grid is refreshed a
second time, then the correct rows are shown.
Can someone suggest the proper way to go about this or point out the
error in our refresh syntax?
Thanks
single table. The underlying data can be updated/deleted from another
component.
In our case, we raise an event when any underlying changes happen. We
then have been trying to refresh our grid without much luck.
We use:
this.DataSet.Offers.Clear();
this.offersTableAdapter.Fill(this.DataSet.Offers);
this.offersBindingSource.ResetBindings(false);
this.offersDataGridView.Refresh();
We have tried multiple variations but the underlying data is fairly
small. Unfortunately, if a row is deleted often the grid will then
think that two rows have been deleted. If the grid is refreshed a
second time, then the correct rows are shown.
Can someone suggest the proper way to go about this or point out the
error in our refresh syntax?
Thanks