Dim dt As Table = Tables("工作计划")
'Tables(e.form.tableName).ListMode = True '突出选定行
'Tables(e.form.tableName).ExtendLastCol = True '当前表自动调整列宽
dt.ListMode = True '突出选定行
dt.DataTable.SysStyles("CurrentRow").BackColor = Color.DeepSkyBlue
dt.DataTable.SysStyles("EmptyArea").BackColor = Color.White '当前表空白区背景色
dt.DataTable.Grid.Styles("Normal").Border.Color = Color.red
dt.ExtendLastCol = True '当前表自动调整列宽
'Tables("订单").Cols("数量").Width = 150 '当前表指定列的宽度
dt.DefaultRowHeight = 40 '当前表自动固定行高
dt.DataTable.SysStyles("Normal").BackColor = Color.red 这样是表格变全部填充色了
---------------------------
错误
---------------------------
编译错误:“Grid”不是“DataTable”的成员。
错误代码:dt.DataTable.Grid.Styles("Normal").Border.Color = Color.red
---------------------------
确定
---------------------------
下面代码也不行
Dim dt As Table
For Each dt As Table In Tables
dt.ListMode = True '突出选定行
dt.DataTable.SysStyles("CurrentRow").BackColor = Color.DeepSkyBlue
dt.DataTable.SysStyles("EmptyArea").BackColor = Color.White '当前表空白区背景色
'dt.DataTable.SysStyles("Normal").BackColor = Color.red
dt.ExtendLastCol = True '当前表自动调整列宽
'Tables("订单").Cols("数量").Width = 150 '当前表指定列的宽度
dt.DefaultRowHeight = 40 '当前表自动固定行高
Next
[此贴子已经被作者于2019/9/29 22:14:22编辑过]