Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Two forms sharing the same DataSet (or DataTable).

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    88

    Resolved [RESOLVED] [2005] Two forms sharing the same DataSet (or DataTable).

    I have read jmcilhinney’s post on using a Dialog to edit a DataGrid. (Nice addition to the codebank). Update Grid Row in Dialogue

    Can a similar technique be used to share the entire DataTable (through an existing BindingSource perhaps) to a second form (which would have a DataGrid) rather than just sharing select rows of data from the BindingSource?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2005] Two forms sharing the same DataSet (or DataTable).

    Of course. A DataSet is just an object like a DataRow. You can pass any object you want from one form to another.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    88

    Re: [2005] Two forms sharing the same DataSet (or DataTable).

    Got it. It has taken me awhile, but I think I am starting to understand the notion of “object oriented” programming… well at least enough to know where to look for an answer.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width