I’ve an UltraWebGrid set as hierarchical and contains 2 bands. By default, the column header of the parent band will only show at the top of the grid, while the child band column header will be shown under every parent record which contains child record(s). I’m struggled to enable the grid to show the parent column header for every parent record. Any solution on this? Thanks!
Hello pvhhkit ,
I'm just following up to see if you need any further assistance with this issue.
Let me know if you have any concerns or questions.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
We have header for every detail band. How can be set to make detail header to be displayed once for the whle grid (same as header of parent row only for whole band)?
I'm just following up to see if the last suggestion has helped in solving your issue.
If you have any further questions or concerns don't hesitate to contact me.
Hi Maya,
The solution is not OK:
1. The suggested grid InitializeLayout event is only fired when doing databind. However, our page is creating new records which has no databinding
2. Even in data reading mode (which has databinding and run the suggested InitializeLayout code), the header is still showing twice in band 1 level (see the screen shot for the current situation). What we want is either of the following solutions:
i. Make the band 0 behave like the band 1, which show column header on every band 0 record
ii. Make the band 1 behave like the band 0, which only shown column header once at the top
We just want the band 0 and 1 behave the same. Please advise if it is possible.
Thanks.
With the multi-column header approach you could hide the headers of the child band (ColHeadersVisible="No") and then add a unbound header for the parent which will show under the parent headers like this:
Or you could add unbound headers for the parent band which look like the child band’s headers and add unbound hedears to the child band which look like the parent’s headers like this:
Please also refer to the attached sample and let me know if any of those approaches suit your scenario.
can you give some more advice on the widh of the newly added column header. in fact, the added headers may be the same as the child band, and they are not regular.
in your example, under "Parent ID" is "Id", they are both the same size. however some times, "Id" maybe just half width of the "Parent ID" or just 1/3
Hello wobudongta ,
The width of the newly added column header is defined by the SpanX property and:
ch1.RowLayoutColumnInfo.SpanX = 1;
Would mean that this header will span for 1 cell space. Furthermore this property accepts only integers so currently you can’t set it to span only for half a cell. What you could do is to set the SpanX property for the parent to span 2 cells for example and the children to span for only 1 cell.
I hope that was helpful.