1、合并单元格
grd.set_MergeCol(1, True)
2、合计统计
grd.Subtotal(C1.Win.C1FlexGrid.AggregateEnum.Clear)
grd.SubtotalPosition = C1.Win.C1FlexGrid.SubtotalPositionEnum.BelowData
grd.Subtotal(C1.Win.C1FlexGrid.AggregateEnum.Sum, 0, -1, 3, "合计:")
grd.Subtotal(C1.Win.C1FlexGrid.AggregateEnum.Sum, 1, 1, 3, "{0} 小计:")
3、单元格宽
grd.set_ColWidth(11, 160)
4、单元格全选
Dim i As Integer
For i = 1 To grd.Rows - 1
grd(i, 1) = "√"
Next
5、单元格格式化
grd.set_ColFormat(11, "##,##0.00")
6、得到某个单元格值
grd.get_TextMatrix(f.grd.Row, 11).Trim
7、 '冻结3列
grd.frozencols = 3
8、'冻结1行
grd.frozenrows = 1
9、隐藏某列
grd.set_ColHidden(9, True)
10、特别注意
grd.fixedcols属性为0则得到第1个单元格值grd.get_TextMatrix(f.grd.Row, 0).Trim
12、单元格样式设置
Dim sLightBlue As CellStyle = grd.Styles.Add("LightBlue")
sLightBlue.BackColor = Drawing.Color.Yellow
sLightBlue.ForeColor = Drawing.Color.Red
For i = 1 To grd.Rows - 1
If grd(i, 16) = "1" Then
grd.SetCellStyle(i, 2, sLightBlue)
End If
Next