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
105
igx-grid pinned column values are not getting exported
posted

Hi Team, 

We are currently using igx version 14.2.17 . we are using multiheader grid we are pinning the columns when i try to export the grid . pinned column values are not getting exported. Could you please help me in this.

Thanks

Vijay

Parents
  • 460
    Offline posted

    Hello Vijay,

    I have been looking into your question and by default with Excel Export enabled feature igx-grid component always exports the pinned columns. In your case with the multi-column headers in the grid, what I assume is that the multi-column headers themselves are not exported.

    To enable the export of the multi-column headers, what you need to do is to handle the exportStarted event of the igx-grid-toolbar-exporter component, and in the given function you will set the ignoreMultiColumnHeaders option to false when exporting to export the multi-column headers as well.

    <igx-grid #grid height="600px" [data]="data">
         <igx-grid-toolbar>
           <igx-grid-toolbar-actions>
             <igx-grid-toolbar-exporter
               [exportExcel]="true"
               (exportStarted)="exportStarted($event)"></igx-grid-toolbar-exporter>
           </igx-grid-toolbar-actions>
         </igx-grid-toolbar>
    </igx-grid>

    public exportStarted(args: IgxExporterEvent) {
             args.options.ignoreMultiColumnHeaders = false;
    }

    However, I have created a small sample trying to reproduce the described behavior. I am using igx-grid component with Excel Export feature enabled. I also use multi column headers and Pinning feature enabled. On my side everything works as expected and I am able to pin a given multi-column header column and then export the grid to excel. The result is that all the columns along with the pinned column are exported and I can see all the values in the columns. I am testing the sample in your version of Ignite UI Angular ^14.2.x as well as in the latest version of Ignite UI Angular ^15.0.x and everything works as expected.

    The described scenario could be observed here:

    Here you will find my sample for your reference. Please test it on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve, please feel free to modify it and send it back to me along with steps to reproduce. Alternatively, if the behavior cannot be replicated, please feel free to provide your own sample.

    Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior. 

    If you require any further assistance on the matter, please let me know.

    Regards,

    Georgi Anastasov

    Entry Level Software Developer

    Infragistics

Reply Children