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
280
UltraWebGrid Excel Export - Want to hide a column
posted

I'm working with the ultraWebGrid control and I'm trying to produce an Excel export.  So far I've implemented the UltraWebGridExcelExporter, which was incredibly simple (nice one), but the first column in my grid is a checkbox and I don't want to include that in the Excel spreadsheet.  I imagine this is pretty simple but I can't find any documentation on it.

Thanks in advance,

N

Parents
  • 3732
    posted

    Hello,

    The UltraWebGridExcelExporter exports the data displayed in the grid. If you want to modify the exported grid, then we can modify the grid's layout before exporting it and then set it back. Here is a sample code block:

         void btnExport_Click(Object sender,
                               EventArgs e)
        {

    this.UltraWebGrid1.DisplayLayout.Bands(0).Columns.FromKey("Col1").Hidden = true;  

    this.UltraWebGridExcelExporter1.Export(this.UltraWebGrid1)

    this.UltraWebGrid1.DisplayLayout.Bands(0).Columns.FromKey("Col1").Hidden = false;

     this.UltraWebGrid1.DataBind();

    }

    Hope this helps.

    Thanks,

    Sarita

Reply Children
No Data