以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 怎样可以通过一段代码去让系统中的每个表的数据都居中 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=68068) |
-- 作者:新航程小何 -- 发布时间:2015/5/8 19:16:00 -- 怎样可以通过一段代码去让系统中的每个表的数据都居中 各位老师,请问怎样可以通过一段代码去让系统中的每个表的数据都居中? For Each t As DataTable In DataTables t.SysStyles("EmptyArea").BackColor = Color.White t.SysStyles("currentrow").BackColor = Color.khaki For Each dc As DataCol In t.DataCols dc.TextAlign = TextAlignEnum.Center Next Next 我的思路,可是运行错误
[此贴子已经被作者于2015/5/8 19:19:17编辑过]
|
-- 作者:Bin -- 发布时间:2015/5/9 9:03:00 -- Datatable 的 datacols 没有这个属性 table de col 才有.你遍历错了
|
-- 作者:新航程小何 -- 发布时间:2015/5/9 17:40:00 -- bin老师,那这个代码怎么写? |
-- 作者:大红袍 -- 发布时间:2015/5/10 9:57:00 -- For Each t As Table In Tables t.DataTable.SysStyles("EmptyArea").BackColor = Color.White t.DataTable.SysStyles("currentrow").BackColor = Color.khaki For Each dc As Col In t.Cols dc.TextAlign = TextAlignEnum.Center Next Next |