Hi all,
The footer is not added by using ExcelML. Therefore, I have to do some coding in ExcelMLExportRowCreated.
Dim row As New RowElement() is use for adding footer.
Everything is good.
But I would like to change its style, something like border, color, background color.
Need a hellp from all of you.
Andy.
The footer is not added by using ExcelML. Therefore, I have to do some coding in ExcelMLExportRowCreated.
Dim row As New RowElement() is use for adding footer.
Everything is good.
But I would like to change its style, something like border, color, background color.
Need a hellp from all of you.
Andy.
Protected
Sub
carGrid_ExcelMLExportRowCreated(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowCreatedArgs)
Handles
carGrid.ExcelMLExportRowCreated
If
e.Worksheet.Table.Rows.Count = carGrid.Items.Count + 1
Then
Dim
row
As
New
RowElement()
Dim
footer
As
GridFooterItem = TryCast(TryCast(sender, RadGrid).MasterTableView.GetItems(GridItemType.Footer)(0), GridFooterItem)
For
Each
column
As
GridColumn
In
TryCast(sender, RadGrid).MasterTableView.Columns
Dim
cell
As
New
CellElement()
Dim
cellText
As
String
= footer(column.UniqueName).Text
Dim
result
As
Integer
If
cellText.Contains(
" "
)
Then
Try
result =
Integer
.Parse(cellText.Substring(6, cellText.Length - 6))
cell.Data.DataItem = result
Catch
ex
As
Exception
Exit
Sub
End
Try
ElseIf
cellText =
"0"
Then
cell.Data.DataItem = 0
Else
cell.Data.DataItem = cellText
End
If
row.Cells.Add(cell)
Next
e.Worksheet.Table.Rows.Add(row)
End
If
End
Sub