CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2001
    Location
    Pretoria, Gauteng
    Posts
    46

    Unhappy Please help: XML based DataSet and Parent/Child relationships in forms

    I was of two minds on whether to put this here or in managed C++, sorry if it's misplaced.

    I have a reasonably simple data schema consisting of a main/parent table and two lookup/child tables (and the appropriate relationships). I created the DataSet in VS 2005 with the Data Designer and in my form I'm loading/saving it from/to XML. As far as I'm aware this shouldn't affect the operation of the dataset itself.

    I am trying to create a simple Windows Forms application that displays a DataGridView and BindingNavigator for the main table, and displays and allows editing of the related values from child tables in TextBoxes. Basically I would like the user to be able to navigate the main record with the gridview and create new records from it, but when they enter new values in the child table textboxes, those are correctly added to the child tables and the appropriate references inserted into the main table.

    Thus far (basically just using the visual editor and setting control properties) I have got the main table and grid interacting, and I can add data to the lookup tables through separate forms with separate bindings, but I can't for the life of me figure out the addition of data to lookup tables from the main form. Is it at all possible to do this sort of thing without actually handling events on each of the textboxes and the DataBinding object and manually updating the data objects?

    Thanks in advance

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Please help: XML based DataSet and Parent/Child relationships in forms

    [ moved thread ]

    Since you are talking about Windows Forms, it belongs here
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  3. #3
    Join Date
    Jun 2001
    Location
    Pretoria, Gauteng
    Posts
    46

    Re: Please help: XML based DataSet and Parent/Child relationships in forms

    Thanks, I thought it might belong in the Visual forum since forms are, well.. visual

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

Featured