不要使用样式,自己在drawcell绘制交替行
Dim i As Integer = e.Row.Index Mod 2
If e.Col.Name = "超期天数" AndAlso e.Row.IsNull("超期天数") = False Then
e.StartDraw()
Dim Width As Integer = (e.Width - 2 )* e.Row("超期天数") \ 60
If e.Row("超期天数") > 0 Then
e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2)
End If
e.EndDraw()
elseif i=1 then
e.style = "样式1"
End If