I have a hierachichal grid which has depth of five levels. when exporting the grid to excel using infragistics excel exporter, the first column is not aligned for the levels greater than two.
Ex: The second level in the grid starts from column "B" in Excel, third from column "C".
Due to this the headers of the column are not in sync with the below column values.
Hi Mike,
Thanks for your help.. I've set the band's Indentation property to 0, and it's working for me :)
Regards
Samuel
Hello seeksam,
There are two possible ways of accomplishing this functionality:
1.) By setting the band's Indentation property to 0, the exporter will align the columns for the band to the first column position.
2.) You can use events of the Excel exporter. To align the first column of the Child Bands to the first column position of the Parent Band when exporting a hierarchical WinGrid into Excel, during the ExcelExport_HeaderRowExporting and the ExcelExport_RowExporting events, check the current row key during exporting and if equal to the DataRelation of the Bands, set the CurrentColumnIndex = 0.
I have attached a sample application to demonstrate this functionality for both approaches. Please let me know if you have any follow-up questions.
Thank you for posting this request on the Infragistics Forums.