Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
225
How to add an additional column while exportin Ultragrid to excel file
posted

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

Parents
  • 71886
    Offline posted

    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.

Reply Children