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
945
Word Wrapping in 12.1?
posted

Hello,

Can someone tell me if its possible (and if so provide a snippet of code) on how to set up word wrapping from a WebDataGrid or WHDG to excel using WebExcelExporter?

Thanks.

Parents
  • 8736
    posted

    Hello,

    You can handle event like cell exporting of the WebExcelExporter and set cell format to wrap column text as shown below:

    protected void WebExcelExporter1_CellExporting(object sender, ExcelCellExportingEventArgs e)
        {
            if (e.CurrentColumnIndex == 1)
            {
                e.WorksheetCell.CellFormat.WrapText = Infragistics.Documents.Excel.ExcelDefaultableBoolean.True;
            }
        }

    I hope this helps

Reply Children