467,074 Members | 875 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

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

Databinding with multiple forms

Wan
Hi,
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.Show()

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.

Wan

Apr 24 '07 #1
  • viewed: 1095
Share:
1 Reply
Wan
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
By using this site, you agree to our Privacy Policy and Terms of Use.