This is a migrated thread and some comments may be shown as answers.

Export grid to Excel Biff - set borders

3 Answers 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 27 Jan 2017, 02:04 PM

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 ?

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 01 Feb 2017, 06:40 AM
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.
0
Julien
Top achievements
Rank 1
answered on 01 Feb 2017, 02:12 PM

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)
0
Eyup
Telerik team
answered on 06 Feb 2017, 01:49 PM
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.
Tags
Grid
Asked by
Julien
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Julien
Top achievements
Rank 1
Share this question
or