Select reccord

Hay,

I load data from a database and show this in a form ,whit the Bindingnavigator i can move to the Next reccords whit the " MoveNextItem_click event."

But how can i move to a reccord on a specific search string

 

 

Find solution

Dim index As Integer

Dim zoekstring As String

zoekstring = Me.BindingNavigatorTextBoxZoeken.Text

index = TVogelBindingSource.Find("Ring nummer", zoekstring)

Me.TVogelBindingSource.Position = index

Me.Invalidate()



Answer this question

Select reccord

  • David T92166

    You should find the position in data source, in your case (assuming you are binding dataset or datatable) this is a DataView. So, something like this:

    DataView dv = (DataView)TVogelBindingSource.DataSource;

    int index = dv.Find ....



  • Select reccord