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.
Hello Chris,
Thank you for getting back to me!
I'm glad that you find the provided fix helpful.
Thank you for using Infragistics Components.
Best Regards,Martin EvtimovSoftware DeveloperInfragistics, Inc.
I am now using 12.3 for both AG and IG.
The issue is resolved with one of the newer versions.
Thank you for the provided sample!
I have investigated this behavior further and it seems to be an issue which I have logged in our GitHub Repository. My suggestion would be to subscribe to this issue in order to get notifications whenever a new information is available. Feel free to add any additional information, or questions that you might have.
Please let me know if you need any further assistance with this matter.
Thank you for choosing Infragistics components!
Best Regards, Martin Evtimov Associate Software Developer Infragistics, Inc.
Knowing that it needed to be a string could have helped me solve the issue with presentation. I was passing a number, not an object. I have fixed it with a simple ".toString()" suffix and it is publishing the downloaded grid as expected: my issue is present with pinned column data being pushed to the end of the worksheet.
Here is the updated sample. I hope you are still online to view this and lend some insight so I don't have to wait until tomorrow to make some progress again.
As you can observe within the provided sample, everything is exported as expected and it seems that the issue is caused due to some additional logic implemented on application level. Having this in mind, I will not be able to investigate the described behavior further and to provide you with solution without having a working sample reproducing the issue you are facing, which I can debug.
I have investigated the modified sample and there seems to be several issues. Probably the most noticeable one is within the grid-toolbar-pinning.component.ts file on lines 52 and 53 where you’re passing an entire objects to the filed property of the igxGridColumns which expects a string.
Please take your time to create a working sample reproducing the described issue and send it back to me for further investigation.
Thank you for logging the feature request!
Best Regards,Martin EvtimovAssociate Software DeveloperInfragistics, Inc.