navigating to record on form from another form
Posted on 2011-02-25
binding controls...binding navigators
I have a form1 : That has a datagrdview.
I have a command button on that form1 that opens form2...and then is going to a record on form2
based on the following:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
frmForm1.TblMainDataBindingSource.Position = BindingNavigatorPositionItem.Text - 1
The record in form2 is going to a record based on the position of the record I have clicked in the Datagridview in form1.
What I need:
There is a ColumnHeader ("MainTableId") in the datagridview on form1 that shows the id number that corresponds to the id in form2..
I want to go to the record in form2 based on the "MainTableId" number NOT based on the position in the datatgridview...because people will sort the datagridview.. and the positions will be thrown off..