>>>VFP 5.0
>>>
>>>Can any one tell me how to disable rows or checkboxes on rows depending on a logical value on a table?
>>>
>>>
>>>Mahesh
>>
>>You can reset Grid.ReadOnly property based on Table.Field1 value in Grid.AfterRowColumnChange event. For particular columns you should reset Grid.ColumnX.ReadOnly properties.
>
>I tried your solution but I was still able to select the checkbox. The checkbox is within a container class that has been inserted into the first row of the Grid. Another thing I tried was to add the following into the AfterRowColChange event:
>
>thisform.ReportGrid.Column1.CalChkBox.CalChk.Enabled = !control_file.FREEZE
>
>where CalChkBox is the container class containing the checkbox.
>
>This disables the checkbox for the record that is FROZEN, but it also disables the the checkboxes in the other rows because the Sparse property on the column is set. Clicking on a checkbox on another row enables all the checkboxes.
>
>Is there a way of setting the checkboxes to disabled when the screen is initially displayed?
>
>Mahesh
If you do not wish to be able to select a check box within a grid column, use code in the WHEN clause of the check box (_not_ the column) that returns .F. this will prevent the check box from being selected.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only