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.
After understanding better what you try to accomplish, I have submitted this issue in our internal development tracking system for further investigation under ID 237804. I also created a case for you CAS-184281-S7D4M2 and I will update you for the progress of this issue via the mentioned case. You could reach out your case following the link at https://es.infragistics.com/my-account/support-activity In order to view the status of all your development issues you should log into your account.
Please let me know if you have additional questions regarding this matter.