Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkbox in Grid is ReadOnly though grid is not
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00229996
Message ID:
00230192
Views:
22


>You've checked the column readonly = .F. too?

Well, it is still the default .F., so it should be OK...

As it turns out, I continued to work on work-around, and I messed in the AfterRowColChange event. I didn't think it would have any better hooks to allow the single-click execution I desired, but the following code did the trick:

-------
LPARAMETERS nColIndex

* Weird grid behavior...sometimes controls get set to readonly for no
* apparent reason when a cell gets focus. Make sure the control ends up
* with same ReadOnly status as the column
LOCAL lcCurrentControl
lcCurrentControl = 'THIS.Columns[nColIndex].' + ;
THIS.Columns[nColIndex].CurrentControl
IF PEMSTATUS(&lcCurrentControl,'ReadOnly',5)
&lcCurrentControl..ReadOnly = THIS.Columns[nColIndex].ReadOnly
ENDIF
--------

This basically just forces the current control of the column to have the same ReadOnly status as the column. So, if you are playing around a lot with multiple controls in a column and really need more intricate control, this won't really work for you.

I still have no idea why my checkboxes are being set to readonly, I just know that the AfterRowColChange event appears to reign over that.

I am still open to any other thoughts/feeling/experimentations! *smile*

Thanks,
JoeK
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform