Hi all,
I am trying to export empty data to excel.The style is not getting applied for Empty data or only Heading row.Please help
i have the below two eventhandlers to apply style:
Protected Sub rgInbox_ExcelMLExportRowCreated(sender As Object, e As GridExcelBuilder.GridExportExcelMLRowCreatedArgs) Handles rgInbox.ExcelMLExportRowCreated
If e.RowType = Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowType.HeaderRow Then
For Index As Integer = 0 To e.Row.Cells.Count - 1
e.Row.Cells(Index).StyleValue = "normalHeaderStyle"
Next
End If
End Sub
Protected Sub rgInbox_ExcelMLExportStylesCreated(sender As Object, e As GridExcelBuilder.GridExportExcelMLStyleCreatedArgs) Handles rgInbox.ExcelMLExportStylesCreated
Dim normalHeaderStyle As New GridExcelBuilder.StyleElement("normalHeaderStyle")
normalHeaderStyle.FontStyle.Color = System.Drawing.Color.Black
normalHeaderStyle.FontStyle.Bold = True
normalHeaderStyle.FontStyle.FontName = "Calibri"
normalHeaderStyle.FontStyle.Size = 10.0
normalHeaderStyle.InteriorStyle.Pattern = GridExcelBuilder.InteriorPatternType.Solid
normalHeaderStyle.InteriorStyle.Color = System.Drawing.Color.Gray
e.Styles.Add(normalHeaderStyle)
End Sub
I am trying to export empty data to excel.The style is not getting applied for Empty data or only Heading row.Please help
i have the below two eventhandlers to apply style:
Protected Sub rgInbox_ExcelMLExportRowCreated(sender As Object, e As GridExcelBuilder.GridExportExcelMLRowCreatedArgs) Handles rgInbox.ExcelMLExportRowCreated
If e.RowType = Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowType.HeaderRow Then
For Index As Integer = 0 To e.Row.Cells.Count - 1
e.Row.Cells(Index).StyleValue = "normalHeaderStyle"
Next
End If
End Sub
Protected Sub rgInbox_ExcelMLExportStylesCreated(sender As Object, e As GridExcelBuilder.GridExportExcelMLStyleCreatedArgs) Handles rgInbox.ExcelMLExportStylesCreated
Dim normalHeaderStyle As New GridExcelBuilder.StyleElement("normalHeaderStyle")
normalHeaderStyle.FontStyle.Color = System.Drawing.Color.Black
normalHeaderStyle.FontStyle.Bold = True
normalHeaderStyle.FontStyle.FontName = "Calibri"
normalHeaderStyle.FontStyle.Size = 10.0
normalHeaderStyle.InteriorStyle.Pattern = GridExcelBuilder.InteriorPatternType.Solid
normalHeaderStyle.InteriorStyle.Color = System.Drawing.Color.Gray
e.Styles.Add(normalHeaderStyle)
End Sub