Gary,
>Are you saying that the above code does or does not actually work?<
Yes, it does actually change the chkBox to True as required, because the Save button is then pushable. As soon as I press Save the chkbox reflects that, but not before. Or, as soon as I move off that row - the chkbox reflects the change, but Save is still pushable.
>The thing that stands out to me here is that you are trying to affect the appearance/behaviour of the non-active cell.<
True - the only purpose of the grid is to scroll through a grid with 4 columns, and set a chkBox to true or false. Some of these grids might have 500 records, and I give user's the option of either mousing the check box, or pressing Enter cause they are already incrementing anyway with the keyboard.
>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? <
Yes
>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.<
Right, I found this out.
>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)<
You mean using the replace command? You saying that - made me think of the following.....
I just added the following THISFORM.Save() and it does the trick. You think that would be a problem doing something like:
LPARAMETERS nKeyCode, nShiftAltCtrl
IF m.nKeyCode = 13
IF MyGridTable.wk01 = 0
THIS.PARENT.PARENT.COLumn4.CHkcheckboxcustom1.SetValue(1)
ELSE
THIS.PARENT.PARENT.COLumn4.CHkcheckboxcustom1.SetValue(0)
ENDIF
THIS.PARENT.PARENT.Column4.Chkcheckboxcustom1.REFRESH()
THISFORM.Save('MyGridTable')
NODEFAULT
ELSE
DODEFAULT(nKeyCode, nShiftAltCtrl)
ENDIF
This save's the change immediately, and updates the chkBox. This is not really a problem, because if they press Enter again, I added code to uncheck the chkBox. What you think?
Mel Cummings