Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Me.BindingContext(.,....)Position not working

Status
Not open for further replies.

vbtest5

IS-IT--Management
Nov 16, 2002
37
0
0
IN
Hi,

I have a grid control on the Form1. When my form runs, I fill the grid binding it to the underlying dataview. Now when the user clicks on any row in the grid, I have to open a new form (Form2) in edit mode. From the grid form (Form1), when I call the edit form, I use position property as follows:

Me.BindingContext(dataview1).Position

But this always returns me 0. Hence my edit form displays incorrect values. What is the problem here?

Regards,
Varsha
 
When you use Me.BindingContext(dataview1).Position, it is looking at the form's BindingContext (Me), not the DataGrid's BindingContext. Change the line to Me.<DataGridName>.BindingContext(dataview1).Position, where <DataGridName> is the name of your DataGrid.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top