Hi Team,
I am Using Infragistics 14. I am trying to export grid data to excel report. I am facing Issue in the report as below.
When I export Grid data , It is not matching with the reports which i am exporting. There are some columns added and some columns removed in the report. But there is no problem with the data at all.
can you please let me know if it is known issue. and suggest me the solution.
Regards,
Hardik
Hello Hardik,
I am just checking about the progress of this issue. Let me know if you need my further assistance on this issue.
Thank you for using Infragistics Components.
Hi Hardik,
Thank you for the provided code snipped.
I have tried to reproduce the issue using your code and everything worked as expected for me – the grid gets exported and all the columns match the grid columns. I used the latest service release of 14.1 (v14.1.20141.2035). I have attached my sample. Please modify it so it reproduces your issue and I will be glad to research this issue further.
I am looking forward to your reply.
Thanks Dimitar for replying
I have taken Exporter and using the Exporter methodto Export Grid data.The column in the column chooser also different from the grid.
Please look at below code.
if (this.ultraGrid2.Rows.Count > 0) { SaveFileDialog saveFile = new SaveFileDialog(); saveFile.Filter = "Excel Files (*.xls)|*.xls |Excel Files (*.xlsx)|*.xlsx|All Files (*.*)|*.*"; saveFile.DefaultExt = ".xls";
if (saveFile.ShowDialog(Controller.MainForm) == DialogResult.OK) { if (saveFile.FilterIndex == 2) this.ultraGridExcelExporter1.Export(this.ultraGrid2, saveFile.FileName, Infragistics.Documents.Excel.WorkbookFormat.Excel2007); else this.ultraGridExcelExporter1.Export(this.ultraGrid2, saveFile.FileName); } }
Please let me know if you need some more information.
Thank you for contacting Infragistics Developer Support.
Are you handling events like RowExporting or CellExporting? Are you incrementing the CurrentColumnIndex in any of these events? Can you provide me with a sample that demonstrates this issue or at least sample code? This way I will be able to research it and let you know what is causing the issue.