Databinding with multiple forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wan

    #1

    Databinding with multiple forms

    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.txtA ppNum.DataBindi ngs.Add(New Binding("Text",
    ds.Tables(0), "App"))
    frmsubform.cbAp pStatus.DataBin dings.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

  • Wan

    #2
    Re: Databinding with multiple forms

    Forgot to update. Solved the issue by using another dateset.

    Comment

    Working...