I am sorting datatable datewise like
TableWithOnlyFixedColumns.DefaultView.Sort = "TradingDate asc";
then assign this datatable to datagridview to display the sorted records like.
datagridView1.DataSource =TableWithOnlyFixedColumns.DefaultView;
But the problem is when datatable is updated means is changed then according to datatable, datagridview also updates its records but I want like when above statement execute again it should update its record.
And if I copy the records from the datatable to datagridview cell by cell manually then records in the datagridview is not sorted datewise.
What I can do for this ?
A
DataGridView, when given aDataSourceis inherently data-bound. You can suspend notifications (for example, by going via aBindingSourceand settingRaiseListChangedEventstofalse), but this is just notifications – it is still looking at the sameIListSource/IListetc.To get truly isolated data, either: