>>>I'm pretty sure I'll feel silly when this is explained but.........
>>>
>>>I've put a Grid control on a form.
>>>
>>>When the user dbl-clicks on a cell in the first column, I want something to happen. For testing purposes, it's just to pop up a messagebox. So in
MyGrid.Column1.Text1.dblclick I put in MESSAGEBOX("dbl click")
>>>
>>>When the user dbl-clicks, nothing happens. I put a Messagebox in
>>> myGrid.click
>>> myGrid.column1.text1.click
>>>
>>>but none of them seem to activate either. What am I overlooking???????
>>>
>>>Thanks to all...........Rich
>>
>>Do you have the property AllowCellSelection to False?
>>
>>When that property is false, only Grid events are raised. You can put your code in grids dblclick event then
>
>I tried it and can now get to the grid's events. I'm not sure how useful it will be however. I want to do something only if the dbl-click was in column1 (and eventually do other things when things happen in other columns. I don't see how to find out which column I'm in (grid.activecolumn = 0 at this point)
>
>Even worse, this prevents my users from navigating in the grid to get to columns past the visible display.
>
>So thanks for the attempt. Any other ideas?
Here is some code that I have in on of my grids right click event, it works for me. Hope this helps.
AMOUSEOBJ(aMouseInfo,1)
STORE 0 TO lnWhere, lnRelRow, lnRelCol
THISFORM.grdApptsView.GRIDHITTEST(aMouseInfo[3],aMouseInfo[4],@lnWhere,@lnRelRow,@lnRelCol)
IF (!lnWhere = 3)
RETURN .F.
ENDIF
THIS.ACTIVATECELL(lnRelRow,lnRelCol)
lnColumn = THIS.ACTIVECOLUMN