Hi
I am using an old version of RadGrid (2008 Q3) but I hope you will still be able to help.
None of the styles in the grid's skin are applied when I export to excel. They are not applied if i use an embedded skin or a custom skin.
I tried adding styles manually as shown in the documentation like so:
i have tried this with an embedded skin and a custom skin and the styles are not applied to the excel doc
This does work though
How do i get the styles from the stylesheet to be applied in the excel document
thanks a lot
I am using an old version of RadGrid (2008 Q3) but I hope you will still be able to help.
None of the styles in the grid's skin are applied when I export to excel. They are not applied if i use an embedded skin or a custom skin.
I tried adding styles manually as shown in the documentation like so:
Protected Sub gridJourneys_ExcelMLExportStylesCreated(ByVal source As Object, ByVal e As Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLStyleCreatedArgs) Handles gridJourneys.ExcelMLExportStylesCreated For Each style As Telerik.Web.UI.GridExcelBuilder.StyleElement In e.Styles If style.Id = "headerStyle" Then style.FontStyle.Bold = True style.FontStyle.Color = System.Drawing.Color.Gainsboro style.InteriorStyle.Color = System.Drawing.Color.Wheat style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid ElseIf style.Id = "itemStyle" Then style.InteriorStyle.Color = System.Drawing.Color.WhiteSmoke style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid ElseIf style.Id = "alternatingItemStyle" Then style.InteriorStyle.Color = System.Drawing.Color.LightGray style.InteriorStyle.Pattern = Telerik.Web.UI.GridExcelBuilder.InteriorPatternType.Solid End If Next End Subi have tried this with an embedded skin and a custom skin and the styles are not applied to the excel doc
This does work though
Protected Sub gridJourneys_ExcelExportCellFormatting(ByVal source As Object, ByVal e As Telerik.Web.UI.ExcelExportCellFormattingEventArgs) Handles gridJourneys.ExcelExportCellFormatting If e.FormattedColumn.UniqueName = "StartLocation" Then e.Cell.Style("color") = "red" End If If e.FormattedColumn.UniqueName = "ExpandColumn" Then e.Cell.Controls.Clear() End If End SubHow do i get the styles from the stylesheet to be applied in the excel document
thanks a lot