Appending Tables in Datagrid View RRS feed

  • Question

  • Hello,
    I am not a Database and coding expert and i am trying to do a sample GUI for me to do some testing
    i am using VS2008 and SQL server 2005
    Let's assume i have 2 tables:
    ClientTable (ID(key),ProductID(FK), Name,....)
    ProductTable(ProductID(Key), Name, Price....)
    What i am trying to do is print all the necessary data from those 2 tables in a single Datagridview.
    The Data sources is showing me that the Client Table is a Parent of the Product Table.
    When i click on the DataGridView Task and select its data source as the whole data Set, the DataGridView is not updated with anything. however, if i choose any table, it is added correctly.
    so is there a way to append those 2 tables together in the DataGridView ?

    thank you for your help
    • Moved by edhickey Tuesday, December 1, 2009 6:03 PM More appropriate Forum (From:Microsoft SQL Server Modeling)
    Thursday, November 26, 2009 11:36 PM


  • Thank you
    i didn't know that the merge can work if 2 tables have different entries.
    what i did is create a view of the 2 tables using the Entries that are important to me
    and then bounded that view with the Gridview and it works
    • Marked as answer by Yichun_Feng Wednesday, December 2, 2009 7:47 AM
    Wednesday, December 2, 2009 5:50 AM

All replies