G
Guest
Hi, I'm using C# VS2003
I need to bind either a Filtered data view or a data set of changed rows, to
a datagrid programmatically to show changed rows before updating. I can't
seem to do it. The Dataset I'm copying the changes from is typed.
The DataTable is DsMaster.Products;
For example:
dsChanges = dsMaster.Clone(); // Is this needed in order to copy the table?
dsChanges = dsMaster.GetChanges();
dgChanges.DataSource = dsChanges;
dgChanges.DataMember = "Products" // Doesn't work.
The other way is:
DataView dv = dsMaster.Products.DefaultView;
dv.RowStateFilter = DataViewRowState.ModifiedCurrent;
dgChanges.DataSource = dv;
dgChanges.dataMember = "Products"; // Again, doesn't work.
I'm sure this is a simple thing to do. What am I doing wrong?
Thanks for any help
Ant
I need to bind either a Filtered data view or a data set of changed rows, to
a datagrid programmatically to show changed rows before updating. I can't
seem to do it. The Dataset I'm copying the changes from is typed.
The DataTable is DsMaster.Products;
For example:
dsChanges = dsMaster.Clone(); // Is this needed in order to copy the table?
dsChanges = dsMaster.GetChanges();
dgChanges.DataSource = dsChanges;
dgChanges.DataMember = "Products" // Doesn't work.
The other way is:
DataView dv = dsMaster.Products.DefaultView;
dv.RowStateFilter = DataViewRowState.ModifiedCurrent;
dgChanges.DataSource = dv;
dgChanges.dataMember = "Products"; // Again, doesn't work.
I'm sure this is a simple thing to do. What am I doing wrong?
Thanks for any help
Ant