Hi,
Is there a way to keep a child WorksheetRow expanded but its parent is not expanded when data are exported to Excel?
I attached an image to show what I would like to achieve.
Row 1 in the root band is collapsed, the child row 2 and row 3 in two different child bands are expanded.
Your help is greatly appreciated!
Best Regards,Shaolin
Hi Shaolin,
UltraGridExcelExport has event called ExportEnding where you can hide or show explicitly every one of the rows in each child band. In my simplified sample, I expand all rows in all child bands and when I collapse in Excel the first row of the root band, the result I get is equal to the expected image in your initial post.
Look at the attached sample and let me know if it navigates you toward the right direction. Of course, let me know if you have any additional questions.
Hi Ivaylo,
Thanks so much for your reply!
Your code makes all parent rows expanded in Excel, which is not what I asked. Can you please read my description in my original post carefully one more time? I want each parent row either expanded or collapsed in Excel exactly same as it is shown in UltraGrid, expanded or collapsed. In my sample, row 1, row 2 and row 3 are expanded originally. Before I export the data in UltraGrid to Excel, I collapsed row 1. So row 2 and row 3 are expanded but their parent (related to row 2) and grandparent (related to row 3) row 1 is collapsed. The data shown in Excel after they are exported should be same as shown in Figure 2; only row 1 and row 46 are visible and collapsed. If I click on the + button on row 1 and row 1 would become expanded; I would like to see data displayed in Figure 1. I hope I have made myself clear.