G
Guest
I want to navigate to a specific record within a dataset.datatable. Some of my controls are bound to this datatable, and it would be nice to do something like
me.bindingcontext(MyDataset.MyDatatable).position=MyDataset.MyDatatable.FindByMyKeyFiel
But since the Position property is an integer, this obviously doesn't work. Instead Ive been looping through the entire table (i.e.
Me.BindingContext(MyDataset.MyDataTable).Position =
While Not Me.BindingContext(MyDataset.MyDataTable).Current("MyKeyField") = keyvalu
Me.BindingContext(MyDataset.MyDataTable).Position = Me.BindingContext(MyDataset.MyDataTable).Position +
End Whil
). This just seems wrong to me. Is there a better way?
me.bindingcontext(MyDataset.MyDatatable).position=MyDataset.MyDatatable.FindByMyKeyFiel
But since the Position property is an integer, this obviously doesn't work. Instead Ive been looping through the entire table (i.e.
Me.BindingContext(MyDataset.MyDataTable).Position =
While Not Me.BindingContext(MyDataset.MyDataTable).Current("MyKeyField") = keyvalu
Me.BindingContext(MyDataset.MyDataTable).Position = Me.BindingContext(MyDataset.MyDataTable).Position +
End Whil
). This just seems wrong to me. Is there a better way?