Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change Value of chkBox in Grid
Message
From
21/11/2002 14:56:09
 
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00725392
Message ID:
00725424
Views:
9
Hi Mel:

>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>IF m.nKeyCode = 13
>	THIS.PARENT.PARENT.Column4.Chkcheckboxcustom1.SetValue(1)
>	THIS.PARENT.PARENT.Column4.Chkcheckboxcustom1.REFRESH()
>	NODEFAULT
>ELSE
>	DODEFAULT(nKeyCode, nShiftAltCtrl)
>ENDIF
>
>This does allow me to press Save, and the chkBox is then checked like I want. However, I want to see the Check box "checked" as soon as I press Enter.

Are you saying that the above code does or does not actually work? The thing that stands out to me here is that you are trying to affect the appearance/behaviour of the non-active cell. In a grid, the only cell that is active is the one you are actually in at the moment (unlike, say, a spreadsheet). I assume that your grid is bound to a data source? You must remember that when a column's "sparse" property is set False, Codemine's enhanced data binding is turned "off". Codemine controls usually require Sparse set True to work as you expect. This, however, is not possible when using a checkbox in a grid.

It might be worth trying to replace the checkbox's control source with the appropriate value (as opposed to calling the control's SetValue() method)and then refreshing the whole grid, locking the screen before and after the refresh. However, for the sake of an immediate "check" action, this might create a little too much overhead for this aesthetic desire.

HTH
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform