Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
190
Export to excel
posted

Hi,

I have an ultrawebgrid with hierarchial data. I am exporting that data to excel.

I have the data in the following format.

                              Jan 09              Q01 09         Q02 09

ItemDescription    Act    Part          Act   Part      Act   Part    like this...

I have three bands. When i export to excel i want the data to be in flat indentation. But it is getting exported in hierarchial indentation. How can i achive that. I tried setting the properties in export click event. But it doesn't seem to work....

Please help me out..

Parents
  • 28464
    posted

    Hello,

    The grid excel exporter exports the grid as it is bound - so if it is hierarchical, it exports it in hierarchical mode. In order to export it in a flat mode, you just need to rebind it just before exporting to a flat datasource. 

    In essence, what you need to do is to have a method which makes a flat datasource (say, ADO.NET DataTable) from your H\hierarchical datasource - e.g. if you have a DataSet with relations you can just enumerate all DataTables and create one big flat DataTable based on that, then rebind.

Reply Children