Dim dr1 As Row = Tables("调度运单_Table1").Current
Dim dr2 As Row = dr1.Clone
dr1.Save ()
dr2.Save()
e.Form.Close()
Tables("调度运单_Table1").Position = dr1.Index
dr1.Style.BackColor = Color.DarkGreen
dr2.Style.BackColor = Color.Blue
想实现变更dr1、dr2这两行的背景颜色。请指导一下,如何实现?
当前行可以这样:
if e.row.index = e.table.rowsel then
e.style = "样式1"
end if
克隆的行如果还没有保存,可以使用行状态判断。保存了就没有办法了
if e.row.datarow = DataRowState.Added then
e.style = "样式2"
end if