HiWhen using Excel Export to export a grid with two bands, the parent band column headers appear for every parent record in the spread sheet, also, filtered out records column headers also appear in the spread sheet - please see below.
Please note the export works fine when the grid has a single band.
We are using version - 10.3.20103.2145
Can you please advise on how to fix this problem.
Thanx for all the advise
Hello,
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
I might need a sample application which reproduces this issue as I am not able to reproduce it in my project. Please attach such sample, I will be happy to take a look at it and assist you further on that matter.
Hi BorisThanks for your prompt reply.What’s interesting is the VB.net we use to implement our Excel export has not changed in years!
We do not change or format cells etc before export we only call .Export as shown below…
Private Sub ExportBottom(ByVal strFilename As String) 'Debug.WriteLine(System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.Name & ":" & System.Reflection.MethodBase.GetCurrentMethod.ToString) Try Dim oSaveFileDialog As New SaveFileDialog With oSaveFileDialog .Filter = "Excel files (*.xls)|*.xls|All files (*.*)|*.*" .FilterIndex = 0 .Title = "Export" .FileName = strFilename If .ShowDialog() = DialogResult.OK Then strFilename = .FileName ueeApplication.Export(ugrApplicationBottom, strFilename) End If End With Catch sqlex As SqlException HandleException(sqlex.ToString) Catch ex As Exception HandleException(ex.ToString) End Try End SubSo why are the parent header columns being repeated for every parent record?
For the first requirement I believe you could use the following code:
private void ultraGridExcelExporter1_HeaderCellExporting(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.HeaderCellExportingEventArgs e) { if(e.GridRow.Index>0) e.Cancel = true; }
As to your second issue, I tried it and it worked fine for me. Could you please attach a small sample project which reproduces this behavior, I will be happy to take a look at it.