changes made in dataview not reflected in datatable?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a datatable/dataview/datagrid. The user selects a row on the datagrid
which is bound to a dataview of my datatable. Now I change one column of the
dataview.

What happens here is that the dataview is updated but the datatable's
rowstate for the modified row is unchanged. So any call to Update() to
reflect changes to my DB are useless.

Anyone has any clue why the rowstate is not modified in this situation?

Thanks,
Sitar.
 
Hi Sitar,

I don't the way you have implemented the DataSource of the DataGrid.
Its a best practise to give the DataTable as the datasource for your
DataGrid. And for modifications, filtering and sorting you can use The
DataView. Any changes done on the DataView too affect the DataTable as it is
referenced and you dont have to call it explicitly. And for DataBase
updations you can modify your real DataTable itself as DataView is used for
displaying your DataTable in different views.
 
Back
Top