470,581 Members | 2,438 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,581 developers. It's quick & easy.

Databinding with multiple forms

I have a test project consists of two forms. The main form contains a
datagrid and a button. On click of button I populate the datagrid with
a ds.table(0) so far so good and on grid's doublick event I bring up
the sub-form which contains controls such as text boxes, lookup, etc.
I can open the sub-form multiple times depending on the doubleclick of
the datagrid. I'm using databinding to bind controls in the sub-form.

on doubleclick event of datagrid ....
Dim frmsubform As New frmSub

frmsubform.txtAppNum.DataBindings.Add(New Binding("Text",
ds.Tables(0), "App"))
frmsubform.cbAppStatus.DataBindings.Add(New Binding("Text",
ds.Tables(0), "Status"))

The problem I'm having is that let's say I have 3 records in the
datagrid and I open the 1st record in the subform and then the 3rd
record in the subform. Now I have 2 sub forms showing records 1 & 3
but if click on 1st sub form and go back to 2nd sub form then both
forms have the identical recordset. How can I keep multiple subforms
with different records using databindings. Thanks in advance.


Apr 24 '07 #1
1 1150
Forgot to update. Solved the issue by using another dateset.

Apr 26 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ben R. | last post: by
3 posts views Thread by Tom McLaughlin | last post: by
4 posts views Thread by pmcguire | last post: by
8 posts views Thread by GaryDean | last post: by
11 posts views Thread by =?Utf-8?B?R29rdWw=?= | last post: by
2 posts views Thread by Nathan Sokalski | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.