Try in Your_Grid.AfterRowColChange
This.ReadOnly = your_table.Completed = 'Y'
I have a grid with the following data:
>
>Date Option Amount Completed
>01/01/05 SPT 65 N
>05/01/05 FPT 105 Y
>09/01/05 XPT 25 N
>
>
>I want to prevent changes to the data on a row if the completed indicator is "Y" and
>allow changes to the row when the status is "N". I have added the following code
>to the when event of each text box in a column to prevent changes to the data in
>that textbox:
>
>if thisform.grdOpt.column4.txtComp = "Y"
> return .F.
>endif
>
>This works fine when the the first row in the grid has the completed value of "Y", however,
>when the first row has a value of "N" in the completed text box I can still make make
>changes to any data in a row where the status is "Y". IF I debug the value of the completed
>text box when i click on another row it always has the value of the completed text box in the
>first row.
>
>How can I prevent any changes to a row where the completed value = "Y"?
>
>Thanks in advance.
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst