Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read Only just one cell in the grid
Message
From
03/10/1997 09:57:10
 
 
To
03/10/1997 09:07:12
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00052856
Message ID:
00053050
Views:
29
>>>>>Is it possible to get just one cell read only in one grid. If so how can I get.
>>>>
>>>>Whatever you like:
>>>>Column.ReadOnly=.T. or Column.Control.ReadOnly=.T. or Column.Control.Enabled=.F.
>>>
>>>Edward, I want just one cell no the entire column.
>>
>>Antonio, it will work for one cell in active row. If you mean that grid should differ behaviour in regard to different rows, than you should either use Column.DynamicCurrentControl property (toggle e.g. enabled/disabled textboxes, I would prefer it) or add some code into Control.When snippet:
>>IF table1.noway=.T.
>> Return .F.
>>Endif
>
>Edward, sorry but I need your help once more. I haven't get to change just one cell to read only. I tried the snippet in the when method and all the rows become read only. The dynamicCurrentControl I don't know how to use in conjunction with read only property.
>
>I have one grid with 5 columns. Just the columns 2 and 3 are possible to enter or update data. But the user can update these columns ( I mean the rows of columns 3 and 4) only if the row of column 4 is empty.
>
>TIA

If you want to use When, then actually I gave you an example (When will return .F. conditionally depending on some field.value). To apply DynamicCurrentControl property you can look at example in UT Knowledge Base. It describes how to use DynamicFore/Backcolor properties, and DynamicCurrentControl logics is the same (you have to add two controls to the column: enabled and disabled, and the property will bring up one of them depending againg on some field value).
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform