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
310
excel exporter control exported event problem
posted

Private Sub grdExporter_Exported(sender As Object, e As ExcelExportedEventArgs) Handles grdExporter.Exported

e.Worksheet.Columns(0).SetWidth(140, Infragistics.Documents.Excel.WorksheetColumnWidthUnit.Pixel)

e.Worksheet.Columns(1).SetWidth(140, Infragistics.Documents.Excel.WorksheetColumnWidthUnit.Pixel)

Hi, is there any way to manage the columns names and not the index columns ?

thanks

  • 25665
    Offline posted

    Hello Hugo,

    Thank you for contacting Infragistics!

    You can achieve this by going through the grid to get the column then index as follows:

    int index = WebDataGrid1.Columns["DepartmentName"].Index;