Grid not export to Excel in Column order
on 2007-04-11 (EST)
I'm using UltraGrid 2 and allowing the user to export the contents to Excel.
However if the user moves the Columns the Excel shows the orginal column
order let me explain.
Default Column order is 1 2 3 4
User changes to 1342 then exports to excel but the columns in Excel are 1234
Here is my Code:
iRow = 1
iCol = 1
With oWsh <--- Excel WorkSheet
For iColumnIndex = 0 To grdGrid.Bands(0).Columns.Count - 1 <---Loop
through the Columns
If grdGrid.Bands(0).Columns(i).Hidden = False Then <-- Ignore if
Column is Hidden
Set oRge = oWsh.Cells(iRow, iCol)
oRge.Value = grdGrid.Bands(0).Columns(iColumnIndex).Key <---
Column Name to excel
oRge.Font.Bold = True
How can I output the Actual order they are on screen (1342 instead if 1234).
Message was originally posted to infragistics.products.archived.com.general