Posted 22 February 2018, 4:56 am EST
Hi,
For setting and getting the information about the font of a Row, Col, CellRange and a single Cell use the below code:
'setting font for row, col, cellrange and cell
Dim cs As CellStyle = C1FlexGrid1.Styles.Add("Verified")
cs.Font = New Font(Me.Font.Name, 11)
C1FlexGrid1.Rows(4).Style = cs
C1FlexGrid1.Cols(1).Style = cs
Dim crg As CellRange = C1FlexGrid1.GetCellRange(1, 1, 2, 2)
crg.Style = cs
C1FlexGrid1.SetCellStyle(1, 1, cs)
'Getting font from row, col, cellrange and cell
Dim style = C1FlexGrid1.Rows(2).Style
style = C1FlexGrid1.Cols(2).Style
style = C1FlexGrid1.GetCellRange(1, 1, 2, 2).Style
style = C1FlexGrid1.GetCellStyle(1, 1)
Dim fontName As String = ""
If style Is Nothing Then
fontName = C1FlexGrid1.Styles.Normal.Font.Name
Else
fontName = style.Font.Name
End If
For more information read the documentation at below links:
http://helpcentral.componentone.com/nethelp/c1flexgrid/cellappearance.html
http://helpcentral.componentone.com/nethelp/c1flexgrid/settingthefontofasinglecell.html
http://helpcentral.componentone.com/nethelp/c1flexgrid/formattingcellsbasedoncontents.html
http://helpcentral.componentone.com/nethelp/c1flexgrid/ownerdrawncells.html
Thanks,
Singh