accessing fields in typed dataset

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

Guest

Hello

I'm having an issue accessing fields in a typed dataset while using data binding. I'm using a BindingManagerBase and binding context with the .AddNew() (which is supposed to automatically create new row on datatable and go there) method on BMB and then EndCurrentEdit(). The fields on the form are bound to a table/column in the dataset, and all works well if I only use the binding but there are situation where I want to access the new row's fields without binding, but through code. I've tried to use the 'NewXXXXTableRow' property of the typed dataset to get a handle to the new row, but any assignments I try to do on columns there give me Invalid Casts when I know the assignment is OK.

Anyone with any suggestions

Thanks

G
 
Hi,

Gargantua said:
Hello,

I'm having an issue accessing fields in a typed dataset while using data
binding. I'm using a BindingManagerBase and binding context with the
..AddNew() (which is supposed to automatically create new row on datatable
and go there) method on BMB and then EndCurrentEdit(). The fields on the
form are bound to a table/column in the dataset, and all works well if I
only use the binding but there are situation where I want to access the new
row's fields without binding, but through code. I've tried to use the
'NewXXXXTableRow' property of the typed dataset to get a handle to the new
row, but any assignments I try to do on columns there give me Invalid Casts
when I know the assignment is OK.
Anyone with any suggestions?

Care to show some code?
 
Back
Top