How Do I Pass Bindingsource to Another form.

Discussion in 'ASP .Net Datagrid Control' started by Rob Dob, May 5, 2006.

  1. Rob Dob

    Rob Dob Guest

    Hi,

    I have two forms. the first form has a datagridview who's datasource is a
    bindingsource. when you double click on a datagridview row it then opens my
    second form, which has some databound controls, text boxes that are bound to
    another bindingsource. Both bindingsources are bound to the same dataset,
    and contain the same information. Within my second forms Load method I fill
    my dataset that is bound to my bindingsource with the content of the current
    record selected from my first form. but the problem is that when I save the
    changes made within my second form and close it that these changes are not
    reflected within my first forms datagridviews contents unless I Fill the
    dataset again.

    I'm assuming that what I need to do is use the bindingsource that is
    contained within my first form in my second form, that way any changes will
    be immediately reflected back into my main form.. If this is the case, how
    do I go about doing this.?

    Any suggestions would be greatly appreciated.

    Thanks
    Rob Dob, May 5, 2006
    #1
    1. Advertising

  2. Rob Dob

    Guest

    Use the server.transfer method. It will provide the contents of the
    intial form to the redirected form.
    , May 5, 2006
    #2
    1. Advertising

  3. Rob Dob

    Rob Dob Guest

    Hi,

    This is a WinForm Windows application not a Webform.., Do you know how I
    would make use of the bindingsource within the first form in my second form?

    thanks,


    <> wrote in message
    news:...
    > Use the server.transfer method. It will provide the contents of the
    > intial form to the redirected form.
    >
    Rob Dob, May 5, 2006
    #3
  4. Hi;

    You're in the wroooooooong place for WinForm questions. Best way to handle
    it for plain old windows forms is to pass the object in the constructor of
    the child form and use it in there.

    --
    thanks - dave
    david_at_windward_dot_net
    http://www.windwardreports.com



    "Rob Dob" wrote:

    > Hi,
    >
    > This is a WinForm Windows application not a Webform.., Do you know how I
    > would make use of the bindingsource within the first form in my second form?
    >
    > thanks,
    >
    >
    > <> wrote in message
    > news:...
    > > Use the server.transfer method. It will provide the contents of the
    > > intial form to the redirected form.
    > >

    >
    >
    >
    David Thielen, May 6, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tom
    Replies:
    4
    Views:
    9,859
    S. Justin Gengo
    Nov 13, 2003
  2. Jay
    Replies:
    5
    Views:
    1,730
    Mr. Arnold
    Jun 29, 2010
  3. Rob Dob

    BindingSource, Archiving Old record before saving new changes

    Rob Dob, Mar 14, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    132
    Brian Smith
    Mar 16, 2006
  4. Rob Dob

    How Do I Pass Bindingsource to Another Winform.

    Rob Dob, May 5, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    4
    Views:
    206
    SparkPlug
    May 17, 2006
  5. Rob Dob

    How Do I Pass Bindingsource to Another form.

    Rob Dob, May 5, 2006, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    177
    David Thielen
    May 6, 2006
Loading...

Share This Page