>Hi DotNetters!
>
>A delima with DataViews I am having. I have a WinForm with several textboxes that are bound to a data view object. I want to be able to navigate using navigation buttons (top, prev, next, bottom). Using objects bounded to a data set I just simple use a statement like:
>
>me.BindingContext(ds,"MyTable").Position += 1
>
>to move to the next record. And all the textboxes are updated with contents of the row in that position. How do I achieve this using a data view?
>
>I tried the same syntax, but instead of referencing the data set, I referenced the data view object:
>
>me.BindingContext(ds,"MyTable").Position += 1
>
>When I check for the value of the position... it has changed. But the textbox still shows the contents of the first record.
>
>To further test, I added a grid and bounded it to the same data view object. When I navigate using the grid the values of the textboxes are updated as well.
>
>Any idea what I am doing wrong?
>
>
>Thanx! in advance 8 )
>
>Martin
Martin,
Maybe it's a typo but I see you still reference dataset not dataview (also did you update text bindings to use dataview).
me.BindingContext(ds,"MyTable").Position += 1
should be:
me.BindingContext(dv).Position += 1
Cetin