Skip to content

Master child datagridview

Nate

Asked Apr 29, 2008, 6:26 PM EDT1 answer
Share
LinkedInX

Hi,

I am working on master child datagridview using windows C# 2.0. How can I do this? Any sample code would be appreciated.

Regards..

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Bechir Bejaoui
    0
    You simply add two datagrid view and type:
    them add this code

    DataGridView1.DataSource = yourDataSource;
    DataGridView1.DataMember = yourDataSource.Tables["MotherTable"].TableName;

    DataGridView2.DataSource = yourDataSource;
    DataGridView2.DataMember = yourDataSource.Tables["ChildTable"].TableName;
    0