改变某行某列字段颜色参见:
http://bbs.csdn.net/topics/392031902
ls_exp = "~"0~t if ( ( id =310 ) , " + string(ll_red) + " ,0 )" + "~""
<DW Control Name>.Modify("<Columnname>.Color=" + ls_exp)
//改变全行字段颜色
long al_color_cur //红色
long al_color_bak //黑色
long i
long ii
string col_name
string col_visible
ii = long(dw_1.describe("DataWindow.Column.Count"))
for i = 1 to ii
col_name = dw_1.describe("#" + string(i) + ".Name")
col_visible = dw_1.describe(col_name + ".Visible")
if col_visible = "1" then //如无不可视字段可不判断
dw_1.modify(col_name + ".Color=~"0~t if ( ( id =307 ) , " + string(ll_red) + " ,0 )" + "~"")
end if
next