可以绘制单元格 DrawViewCell
http://www.foxtable.com/webhelp/scr/2874.htm
e.DrawDefault = False '取消默认的绘制
Dim g As Graphics = e.Graphics
Dim sf As new StringFormat
Dim cs1() As String = {"国家","备注","宗教"}
Dim cs2() As String = {"语言"}
Dim cs3() As String = {"日期", "人口"}
If array.Indexof(cs1, e.Col.name) >= 0 Then
sf.Alignment = StringAlignment.near
sf.LineAlignment = StringAlignment.near
ElseIf array.Indexof(cs2, e.Col.name) >= 0 Then
sf.Alignment = StringAlignment.Center
sf.LineAlignment = StringAlignment.Center
ElseIf array.Indexof(cs3, e.Col.name) >= 0 Then
sf.Alignment = StringAlignment.far
sf.LineAlignment = StringAlignment.far
Else
sf.Alignment = StringAlignment.near
sf.LineAlignment = StringAlignment.near
End If
Dim fnt As New Font("宋体",9)
Dim msg As String = e.Row(e.Col.name)
g.DrawString(msg,fnt,Brushes.black, new Rectangle(e.x, e.y, e.width, e.height), sf)