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
1660
How to alter the position of bands in excel file while exporting UltraGrid data
posted

Hi

I am using an ultraGrid which has data as shown in the screen shot below.

                              

After exporting the data of the ultragrid to an excel file, the contents of the excel file is shown as below.

                              

Is there any way to get all the bands position aligned to the left while exporting the grid as shown in the screenshot below?

                             

Thanks in advance

  • 21795
    Verified Answer
    Offline posted

    Hello Thangachan,

    Thank you for posting in our forum.

    In order to position all exported bands to the left you need to set the Indentation property of each band to 0. Please note you may do this in ExportStarted event. You may use code like this:

    private void ultraGridExcelExporter1_ExportStarted(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.ExportStartedEventArgs e)
    {
           foreach (UltraGridBand band in e.Layout.Bands)
           {
                  band.Indentation = 0;
           }
    }

    Please let me know if you need any additional information.