示例文件中,进度列属性为字符,不太理解,其次,能否绘制出来显示百分比数字,如40%,而不是40,谢谢
If e.Col.Name = "进度" AndAlso e.Row.IsNull("进度") = False Then
e.StartDraw()
Dim Width As Integer = (e.Width - 2 )* e.Row("进度") \ 100
If e.Row("进度") = 100 Then
e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2)
Else
e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2)
End If
e.EndDraw()
End If