Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling rows on a Grid
Message
From
17/05/1997 08:44:27
Jon Ziegler
Mannesmann Dematic Corp.
Solon, Ohio, United States
 
 
To
16/05/1997 10:52:53
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00032416
Message ID:
00032676
Views:
41
>>>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
Map
View

Click here to load this message in the networking platform