It is unclear why you need to use the Modify() function to redefine the datawindow after your window has initialised. Try adding a condition to the protect and background properties of the column in the Datawindow painter at design time.
If you can only determine the condition at run-time, then use the Modify() function in the datawindow control constructor event (so is only run once), and supply a condition...
eg.
// Minor DOB protected on minor flag
object.minor_dob.background.mode="0~tif ( minor = 'Y', 0, 1 )"
object.minor_dob.protect="0~tif ( minor = 'Y', 0, 1 )"