Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Row-Level Grid Access
Message
From
18/08/1998 13:23:10
 
 
To
18/08/1998 13:22:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00127777
Message ID:
00127798
Views:
28
>>Hi folks:
>>
>>I am trying to control user-access to a combo-box in a grid.
>>
>>I have a grid with a column "COMPANY". It contains a Combo-Box, since there are only a few Companies allowed in this field. The field may or may not be filled. There is also an ADD button on the form, so the row may be brand new. The whole form has a SAVE button (it does a TableUpdate()) and an UNDO button (it does a TableRevert()).
>>
>>Once the User has filled this field and saved it, I want to prevent them from changing it.
>>
>>I tried testing for the value in the datafile ( if len(trim(GRIDDATA.Company))>0 ) in the Grid1.Column1.Combo1.GotFocus()and setting the combo-box's ENABLED property, but once a field is DISABLED I cannot ENABLE it again.
>>
>>I also tried doing the same test in the Combo-Box's WHEN method (Return .T. or .F. to control access), but thisseems to only get run the first time the grid is CLICKed. When I click on what should be an editable row, the debugger suggests that it fires the WHEN for the first row and THEN fires the WHEN for the CLICKed row. But it seems to ignore the second WHEN.
>>
>>
>>Can you set access to a field in a grid on a row-by-row basis? If so, how?
>
>Have you tried using the WHEN method of the column?
>I haven´t tried it, but I would set it to something like
>
>
RETURN !EMPTY(SomeDataField)
Oops! I meant
RETURN EMPTY(SomeDataField)
without any "!".
Previous
Reply
Map
View

Click here to load this message in the networking platform