Export grid to Excel Biff - set borders

4 posts, 0 answers
  1. Julien
    Julien avatar
    9 posts
    Member since:
    Jun 2016

    Posted 27 Jan 2017 Link to this post

    Hi,

    I'm exporting my grid to Excel in Biff method.

    I ssucessfully added background colors to the headers but I don't get to set borders on the cells of the excel export.

    How can I achieve this ?

  2. Eyup
    Admin
    Eyup avatar
    3841 posts

    Posted 01 Feb 2017 Link to this post

    Hi Julien,

    Biff exporting is more specific than other exporting formats, therefore, not all customization is supported:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/exporting/export-formats/excel-biff-export

    You can try using the default HTML exporting format if you prefer to apply any additional styling preferences.

    Regards,
    Eyup
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Julien
    Julien avatar
    9 posts
    Member since:
    Jun 2016

    Posted 01 Feb 2017 Link to this post

    I tried the default HTML exporting format but it does not take styles into account.

    Here I tried to set background color of a column (in the Page_Load event) but it does not work :

    Dim boundColumnCodeLot As New GridBoundColumn()
    boundColumnCodeLot.DataField = "Code_Lot"
    boundColumnCodeLot.UniqueName = "Code_Lot"
    boundColumnCodeLot.HeaderText = "Lot"
    boundColumnCodeLot.ColumnGroupName = "GroupDocument"
    boundColumnCodeLot.ItemStyle.ForeColor = Drawing.Color.Red
    boundColumnCodeLot.ItemStyle.BackColor = Drawing.Color.LightGray
    GridInfos.MasterTableView.Columns.Add(boundColumnCodeLot)
  4. Eyup
    Admin
    Eyup avatar
    3841 posts

    Posted 06 Feb 2017 Link to this post

    Hi Julien,

    Try creating the grid during Page_Init:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/defining-structure/creating-a-radgrid-programmatically#creating-a-radgrid-on-page_init

    Also, enable the UseItemStyles property. I've prepared a sample RadGrid web site to demonstrate that. Please run the attached application and verify the result.

    Regards,
    Eyup
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top