Tables("报价表信息核对_table1).SysStyles("CurrentRow").BackColor = Color.White
嗯嗯。多谢,不过我发现这个并不能改变listmode 开启后的这个颜色, 这个是如何用代码修改呢
改成其他颜色了,但是listmode 的颜色还是没有变化。
我测试没有问题
Tables("表A").ListMode = True
Tables("表A").SysStyles("CurrentRow").BackColor = Color.blue
我发现是什么问题了。是drawcell里面的代码有影响,但是我吧这行代码放到drawcell 的最后一行的话,效果还是会被覆盖。有什么好的办法吗
If e.Row.IsNull("绑定编号") =False Then
If e.Row("_identify") = e.Table.Current("_identify") Then
e.style = "绑定2"
Else
e.style="绑定"
End If
End If
e.Table.grid.Cols(0).widthdisplay = 4
If e.Row.IsNull("商务颜色记录") = False Then
Dim n As String = "样式" & e.Row("_Identify") & "_" & e.Col.name
Dim ary() As String = e.Row("商务颜色记录").split("|")
For Each s As String In ary
Dim a() As String = s.split(":")
If a(0) = e.Col.name Then
e.Table.DataTable.AddUserStyle(n, Color.FromARGB(a(1)), Color.black)
e.Table.DataTable.Styles(n).BackColor = Color.FromARGB(a(1))
e.style = n
Exit For
End If
Next
End If
If e.Row("状态") = "客户通过" AndAlso e.Col.Name = "来源" Then
e.style = "客户通过"
End If
If e.Row("状态") = "可开piao" AndAlso e.Col.Name = "来源" Then
e.style = "可开piao"
End If
If e.Row("状态") = "长期未结算" AndAlso e.Col.Name = "来源" Then
e.style = "长期未结算"
End If
If e.Row("状态") = "未付款" AndAlso e.Col.Name = "来源" Then
e.style = "未付款"
End If
e.Table.SysStyles("CurrentRow").BackColor = Color.lightblue
e.Table.SysStyles("CurrentRow").BackColor = Color.lightblue改为
If e.Row.index = e.table.rowsel Then
e.style = "当前行样式"
End If
添加一个当前行样式,去掉listmode ,设置为false