Is there are way to setup layout for Parent and child band together?
Something for specific about the layout
My description might not give a clear picture. But I have list of items bound to the control and I want to display the parent properties and child items (expanded). The default hierarchial binding layout is not preffered by the users.
I want to explore the option so open to suggestions about using other controls to achieve this.
BB said:Can I show/hide columns for each row? Maybe in RowLayout?
Columns are defined on the band, so you cannot hide a column on a row-by-row basis.
You can hide a cell, using the Hidden property on the cell. But this will leave an empty space where the cell would have been. I recommend using the InitializeRow event to both populate and hide the unbound cells.
I have max number of child rows so I can add the unbound columns for max. And set not applicable columns to blank.
Can I show/hide columns for each row? Maybe in RowLayout?
Hi,
I'm not sure if I understand the question correctly, but it sounds like you want to show the child data for each parent row as part of the parent row and not under it like a normal child row.
There's no way that the grid can do this by itself. And if you have a variable number of child rows, then I don't see how it would be possible.
But if you know for certain that each parent row in your data source has a fixed number of child rows, then you could achieve this by using unbound columns. What you would do is use the grid's InitializeLayout event to add an unbound column to the parent row for each field you need to display from the child data.
Then you would use the InitializeRow event to examine the data in the child row(s) and populate those unbound field in the parent row.