Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting a grid to read-only
Message
From
24/02/1998 17:32:16
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00080620
Message ID:
00080950
Views:
31
>>>How can I (in a simple way) make the grid "read-only". I have tried setting grid.enable = .F. which is great, but also disables the scroll bars. Before I bark up the wrong tree is there a better way to do this?
>>>
>>>Note: what I want is to still allow the user to scroll through data values, but not be able to change data in text boxes and combo boxes in the grid until they enter edit mode (click an edit button or something). Clear as mud? :-)
>>
>>Use readonly property, e.g. Grid.Readonly=.t. Sometimes you'll have to set specifically Grid.Column1.Readonly=.t. (especially if you add new columns). Also, it's nice to set SET NOTIFY OFF to remove annoying message "record is read only"
>
>Ed, Bela:
>
>The user can still select the combo boxes in the grid and this will cause events to fire. Any other ideas?

Its a pain but you can use a brute force method of setting the all the combos and txtBoxes except one to Enabled = .F. and then when the edit button is pressed turn them back on. I know this is a pain though.
It is impossible to make programs idiot proof. Idiots are too cleaver.

MCP( Tcp/Ip )
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform