I am using an UltraWinTree.UltraTree to display hierarchical data.
As shown in the attached snapshot i want the information marked in red block to be shown above each row of child level 1 .
FYI, for data in red block i have ran a loop and calculated the counts and assigned Text to that Node(child level 2).
I want to show the same information(text) above each row of child level 1
Hello Zalak,
After further research you could achieve similar look with UltraGrid and its RowLayout feature. More information about this feature you will find on the following link:
http://help.infragistics.com/Doc/WinForms/2013.1/CLR4.0/?page=WinGrid_Row_Layouts.html
You should design your data schema at design time, then you should add unbound column which will holds your calculated values and using the RowLayout features you will be able to design and position cell layout of your first band on the desired way. Also you will need to use InitializeRow event in order to fill the calculated value in your unbound column. I’ve implemented simple sample in order to demonstrate you this approach. Please run the sample and let me know if it is match with your requirements.
Please let me know if you have nay further questions.
Hi Hristo,
Thanks for the solution. This works fine for the parent band but when i tried the same for all child bands it did not work.
As shown in the attached snapshot, I want the block marked in red to be displayed in all child bands, the way its working for rows in parent band.
Please suggest with sample code if possible.
Thank you
Thank you for your response.
If you modified Hristo's sample please attach it to the thread so I can look at it.
Hi Dave,
Please find the attachment for the modified sample code.
Thank you for the sample.
When you use the row layout feature of the UltraGrid, it is defined at the band level. If you have multiple bands, you need to define a separate row layout for each band. In your case you will need a separate row layout for each level of children.
Thank you for the reply.
I have used separate row layout for child band, but still its not working.
It would be helpful if u provide me with a sample code.
Thank You.
The reason the sample Hristo provided wasn't working for the child band was because the DataSet that was being bound to the grid at run-time had a different structure than the schema that was set-up in the grid at design-time. I find that if you're going to use row-layouts, it's best to create the dataset at run-time. I've modified the sample to do so.