How to display child rows INLINE along with Parent records using datagrid
The old DataGrid has a great feature, compared to new DatagridView, that it can display maste/detail relational data. We only have to load master table and detail table into a DataSet and set the relationship between them, then set DataGrid's DataSource property to the DataSet and DataMember property to the master table name. The DataGrid displays master table contents with a + sign and once you click the + sign, the relation name appears as a link if you click that the child content will appear. As you notice there is round trip to display the child records and master records.
I want the datagrid to display master table records along with child table records INLINE that is: parent row, then beneath that child rows, then the next parent, so on..
Can anybody help me please? I am working on Windows.Forms.DataGrid
JPosted Dec 21, 2008, 10:52 PM
I'm having the same problem.
It seems like such an obvious inclusion.
Usually I could get away with selecting the master to display its children but this time they need to be displayed inline.
If anyone has advice it would be much appreciated.