Windsailor
Well-known member
- Joined
- Aug 2, 2006
- Messages
- 45
- Programming Experience
- 1-3
Hello,
How do I create a 'bookmark' in a dataset so that I can return to that row after I have updated the database, cleared and re-filled the dataset?
I should say I want the bound datagrid or bound items on a form to return to that particular row after the dataset is filled that second time.
With a textbox that is databound to the PK in the dataset, I have tried:
The problem here is that when the 'click event' is over the bound datagrid returns to the first record, not the select row with the stored PK value.
How do I get the dataset to move to the record that has that PK value?
Thanks for your help and time.
How do I create a 'bookmark' in a dataset so that I can return to that row after I have updated the database, cleared and re-filled the dataset?
I should say I want the bound datagrid or bound items on a form to return to that particular row after the dataset is filled that second time.
With a textbox that is databound to the PK in the dataset, I have tried:
VB.NET:
Dim this As Integer
this = Nothing
this = Me.TextBox1.Text
Me.DSCompetitors.Clear()
Me.CompetitorsTableAdapter.Fill(Me.DSCompetitors.Competitors)
Dim foundRow As DataRow = Me.DSCompetitors.Tables("Competitors").Rows.Find(this)
If foundRow Is Nothing Then
MsgBox("row not found")
Else
End If
How do I get the dataset to move to the record that has that PK value?
Thanks for your help and time.
Last edited: