Hello again,
is it possible to create a hierarchical grid using a flat datasource? I have one datatable with parents and childs in it (returned from a sql statement) and would like to show data hierarchical in the grid. Maybe there is a way I could do this without recreating two datatables from the given one.
If it isn't possible, how would you prefer to get a dataet with parent and child table? I could do one stored procedure return two recordset (parent and child) and place the data in two datatables. Or I could split the data from one datatable back to two datatables..
Thanks, Stefan
The grid cannot create the hierarchy itself; it relies on the relationships being defined in the data source. If you're using a DataSet, you would have to create a relation that specifies how the parent-child relationship should work. You don't need to split apart your data, you can have a recursive relationship on the same table. You might want to set grid.DisplayLayout.MaxBandDepth to something small, though.
-Matt
You might be able to acheive what you want using OutlookGroupBy, as well. This creates a hierarchy from a single table by grouping by the values in one or more columns.