J
Johann Blake
When adding a new row to a DataView, is it possible to cast the
returned DataViewRow to a typed row? Without casting, I am forced to
indicate the names of fields as strings when setting their values.
Example:
DataRowView drv = myDataset.SomeTable.DefaultView.AddNew();
drv["ID"] = Guid.NewGuid();
drv.EndEdit();
Since I already have a typed Dataset, it would be nice if there was a
way to do something like...
drv.ID = Guid.NewGuid();
This has the advantage that it is checked during compile time. Without
doing it this way, if I ever change a field's name or even delete it, I
won't know it until run-time.
Thanks for any help
Johann Blake
returned DataViewRow to a typed row? Without casting, I am forced to
indicate the names of fields as strings when setting their values.
Example:
DataRowView drv = myDataset.SomeTable.DefaultView.AddNew();
drv["ID"] = Guid.NewGuid();
drv.EndEdit();
Since I already have a typed Dataset, it would be nice if there was a
way to do something like...
drv.ID = Guid.NewGuid();
This has the advantage that it is checked during compile time. Without
doing it this way, if I ever change a field's name or even delete it, I
won't know it until run-time.
Thanks for any help
Johann Blake