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
935
Issue with exporting Data Grid using Pinning
posted

I am using Angular/Infragistics 12.0.3.

I have a data grid that runs a lot of calculations before exposing data. I am also pinning the first 5 columns as a result of the size of the grid.

The grid looks correct, but when I export it, the pinned columns contain the first 5 unpinned columns' worth of data and the last 5 columns contain the pinned column data. The column headers are in the right place, but the data is not.

Additionally, the header row is not also pinned in the export, so when scrolling down, the column headers don't stay put, as would be expected.

For the column data being in the wrong place, I suspect it is because of the "pinned" attribute I added to the column definitions. Perhaps I have named it incorrectly?

      this.columns = [
        { field: 'Scenario', type: GridColumnDataType.String, pinned: true, width: '250' },
        { field: 'Design', type: GridColumnDataType.String, pinned: true, width: '110' },
        { field: 'Family', type: GridColumnDataType.String, pinned: true, width: '80' },
        { field: 'Facility', type: GridColumnDataType.String, pinned: true, width: '80' },
        { field: 'Process', type: GridColumnDataType.String, pinned: true, width: '75' },
      ];

I dynamically allocate other columns for the time period the data falls within:

      if (this.rollup !== 'WW' ) { this.scenarioService.getCompareTimePeriods(this.scenarioWorkweeks, startIndex, endIndex, this.rollup).forEach(w => this.columns.push({ field: w, type: GridColumnDataType.Number, pinned: false, width: shorter ? '80' : '115', formatter: this.formatColumnData })); }
      else { for (let i:number = startIndex; i < endIndex; i++) { this.columns.push({ field: this.scenarioWorkweeks[i].name, type: GridColumnDataType.Number, pinned: false, width: shorter ? '80' : '115', formatter: this.formatColumnData }); } }

Column width and styling depend on the parameter being processed. I doubt this is cause for error in exporting Excel, though, since they come out properly in the sheet.

Parents
  • 740
    Offline posted

    Hello Chris,

    Thank you for contacting Infragistics Community!

    After investigating this matter I have tried to replicate your scenario within the following sample. As you can observe the table within the exported excel file has the same structure as the once the igxGrid has. The column headers are aligned in the correct order and so is the data bellow them. In order to be able to assist you further could you please modify the provided sample so that it replicates the issue you’re facing and send it back to me. Having such a sample will be highly appreciated and will allow me to debug it on my side and to provide you with solution as soon as possible.

    Currently freezing the columns headers has been determined to be a feature request. You can submit feature request in our GitHub repository here.

    Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case.

    This will give you the opportunity do directly communicate with our development team regarding the issue and get notifications whenever a new information is available.

    Please let me know if you need any further assistance.

    Best Regards,
    Martin Evtimov
    Associate Software Developer
    Infragistics, Inc.

Reply Children