Hi
I am exporting a grid to pdf following various examples, and I am using the RadGrid_ItemCreated event successfully to have alternating row styles but I haven't found any way to set the font size.
Existing code is :
Protected Sub FormatGridItem(item As GridItem)
If TypeOf item Is GridHeaderItem Then
For Each cell As TableCell In item.Cells
cell.Style("font-family") = "Arial"
cell.Style("text-align") = "left"
cell.Style("vertical-align") = "middle"
Next
End If
' Dim dataItems As GridItem() = View.GetItems(GridItemType.Item)
If TypeOf item Is GridDataItem Then
item.Style("Font-family") = "Arial"
Select Case item.ItemType
Case GridItemType.Item
item.Style("background-color") = "#DDDDDD"
item.Style("Font-size") = "10pt" ' no effect
Exit Select
Case GridItemType.AlternatingItem
item.Style("background-color") = "#FFFFFF"
item.Style("Font-size") = "10pt" ' no effect
Exit Select
Case GridItemType.Header
item.Font.Bold = True
Exit Select
Case GridItemType.Footer
item.Style("background-color") = "#FFFFFF"
Exit Select
End Select
End If
End Sub
how can I set the font size? I have tried using px, pt, and em but it does not change.
Please advise. I haven't seen any code on this; maybe it is not possible or has to be done somewhere else entirely.
Thanks
Clive