>I am trying to restrict access to a limited number of controls contained in a grid depending on the state of the containing form. Some of the cnotained columns shouldn't be accessible/modifiable while others should be.
>
>Even though I set the ENABLED property of the column and the textbox to .f., I can still edit the information in the field.
>
>
> this.Parent.grdpoline.grid.column1.text1.Enabled = .f.
> This.Parent.grdpoline.grid.column1.txtinventorylu1.Enabled = .f.
> this.Parent.grdpoline.grid.column2.text1.Enabled = .f.
> this.Parent.grdpoline.grid.column3.txtQtyOrd.Enabled = .f.
> this.Parent.grdpoline.grid.column4.txtDescription.Enabled = .f.
>
>What am I doing wrong?
>
>Thanks in advance,
>
>Andrew
You're not doing what you're saying you did, modify enabled property of column not the control's in it (grid hierarchy doesn't let yours take over unless bound = .f.). ie:
with this.Parent.grdpoline.grid
store .f. to ;
.column1.enabled, ;
.column2.enabled, ;
.column3.enabled, ;
.column4.enabled
endwith
Cetin