none
Reg:Get data into dataview RRS feed

  • Question

  • Hi,

          I have a two individual  data tables  which contain same column name.So I want get data into either data table or      data view like parent ,child relationship.I need to display data like this.

    parent 1(record)

           Child 1(record)

           Child 2(record)

    Parent 2(record)

            Child 1(record)

            child 2(record)

    Will you help me to solve the above task.

    Thanks

    Chakrahdar.

    Wednesday, October 23, 2013 2:32 PM

Answers

  • Hello,

    From your description, if I understand correctly, you want to know how to display the data as below:

    For this, we usually use the DataGird control which is still supported in .Net FrameWork 2.0.

    And please have a look at the link which shows details.

    http://www.codeproject.com/Articles/9947/DataGrid-with-built-in-filter-functionality

    If you want to use the DataGridView, unfortunately, it does not have build-in support for displaying master/detail data in one DataGridView.

    It is recommended you use two DataGridViews to show the master/detail data; one for the master table and the other for the details table. Here is a sample for your reference:

    How to: Create a Master/Detail Form Using Two Windows Forms DataGridView Controls:

    http://msdn2.microsoft.com/en-us/library/c12c1kx4.aspx

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, October 24, 2013 6:28 AM
    Moderator