Can anybody help me that how can I protect individual column of an individual row, though my datawindow has more than one row. I am writing a code like this:
dw_1.Modify("column_name.protect = '1'")
However it is making all my rows disabled.
Can anybody help me that how can I protect individual column of an individual row, though my datawindow has more than one row. I am writing a code like this:
dw_1.Modify("column_name.protect = '1'")
However it is making all my rows disabled.
You cane make it like : dw_1.SetRedraw ( FALSE )
ls_modstring = as_columnnane + ".background.color = '" + String(RGB( 255, 255, 255 )) + &
"~tIf( protection = 1," + String(RGB( 192, 192, 192 )) + "," + &
String(RGB( 255, 255, 255)) + ")'"
dw_1.Modify( ls_modstring )
ls_modstring = as_columnnane + ".protect = '0 ~tIf( protection = 1, 1, 0 )'"
dw_1.Modify( ls_modstring )
dw_1.SetRedraw ( TRUE )
Where as_columnnane is the column name.
You need to have some sort of conditional statement for the particular row/column you wish to protect. One way is to have an additional field you set programatically like.
Then in your other column you set an expression on the protect property like: