I want to display information in drilldown format using Infragistics wingrid.
I want to display output as shown below. Note that Row 0, Row1 and Row 2 are parent rows. User can expand these rows and upon expansion correponding child rows gets displayed.
Now the child row columns are not consistent across the band and this datatable needs to be created at runtime and assign to child band.
I want to persist the childrow information as well. For e.g. if I expand Row 0 then it should display Column A and ColumnB. Then after if I expand Row 1, it should display Columns C,D, E, without changing layout of of Row 0 child columns.
Row 0
ColumnA
Column B
Row 1
Column C
Column D
Column E
Row 2
Column M
Hi,
I don't beleive it's possible to display non-homogenous data in a DataSet / DataTable, either. Which is one of the reasons the grid doesn't support it. You would have to come up with your own custom data source for this and implement IBindingList.
Or... if you are using the tree, you could simply add the data manually rather than binding the control to a data source.
Thanks Mike. I was going through the Infragistics WinTree Sample to achive the required functionality. I am facing few more problems with it.
As I said, Child DataTable in Row 1 and Child DataTable in Row 2 are different entities and I need to specify the relationship in dataset to make it ‘expandable’.
If I specify relationship in DataSet for both the datatable, then I don’t get required output. WinTree shows me data for both the relation under Row 1 and Row 2.
Please help.
This WinGrid cannot support non-homogenous data like this. All of the rows in a band have to have the same colmuns. So in order to acheive what you have here, your child band would have to have 3 columns. You could leave the cells in the third column of the children of row 1 blank, of course, but the column still has to be there.
If you need to have a different set of columns under each parent row, then you would have to use WinTree. The WinGrid cannot do this.
Thanks for the suggestion Nick, but I want to implement it using ulraGrid. If its a limitation to the control itself [which I dont think so], I will look for other options.
Further, Row 1, 2 ,3 will have its own column information as well, so how will it be possible to display multiple columns in these rows using ultraWinTree control?
Please find below updated layout information. Thanks again.
You might be better off using the column capabilities of an ultrawintree because it can support non-homogeneous layouts.
Nick