Hi,
I am using Infragistics netadvantage 11.2 version and using Ultragrid in my one of the form. I am using
ultraGridExcelExporter.Export(MyUltragridObject, saveFileDialog.FileName, Infragistics.Documents.Excel.WorkbookFormat.Excel2007);
This is working fine. Now I want an additional column to be exported that is not in the Ultragrid. How I can add that while exporting so that in the Output excel I will get that additional column.
Regards,Girish
Girish,
Please try the following approach and let me know of the result:
void ultraGridExcelExporter1_ExportStarted(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.ExportStartedEventArgs e)
{
e.Layout.Bands[0].Columns.Insert(1, "SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSep Coll1");
e.Layout.Bands[0].Columns[1].Header.Caption = "S";
}
Please feel free to let me know if a question about our tool set comes up on your mind.
Hi Boris,
Thanks for the solution. This is what I want. Now one more thing is that how do I assign values to this column. Actually the additional column I am going to add to my grid will be based on some calculation of some other columns.
For e.g. thare are two columns "A" & "B" and now the additional column I am going to add will be sum of Values on Column "A" and "B". So how should I populate the new additiona column while exporting?
Regards<Girish