string ls_modstring,ls_rows[]
long ll_row,ll_col,ll_pos
for ll_pos = 1 to long(dw_1.object.datawindow.column.count)
ls_rows[ll_pos] = ""
next
dw_1.setredraw(false)
//假设此处要修改第2行、第1列
ll_row = 2
ll_col = 1
dw_1.setitem(ll_row,ll_col,"TESTData")
if len(ls_rows[ll_col]) = 0 then
ls_rows[ll_col] = string(ll_row)
else
ls_rows[ll_col] = ls_rows[ll_col] + "," + string(ll_row)
end if
ls_modstring = "#"+string(ll_col)+".Color='0~tcase(getrow() when "+ ls_rows[ll_col] +" then rgb(0,0,255) else rgb(0,0,0))'"
dw_1.Modify(ls_modstring)
//假设此处要修改第4行、第2列
ll_row = 4
ll_col = 2
dw_1.setitem(ll_row,ll_col,"TESTData2")
if len(ls_rows[ll_col]) = 0 then
ls_rows[ll_col] = string(ll_row)
else
ls_rows[ll_col] = ls_rows[ll_col] + "," + string(ll_row)
end if
ls_modstring = "#"+string(ll_col)+".Color='0~tcase(getrow() when "+ ls_rows[ll_col] +" then rgb(0,0,255) else rgb(0,0,0))'"
dw_1.Modify(ls_modstring)
dw_1.setredraw(true)