>Hi All,
>
>Have anyone figured out why the rightclick method inside the grid1.column1.text1.rightclick doesn't trigger at all? No matter if the grid is enable or disable nothing happened, or is there a better way to solve this problem. TIA
Mathew,
It does work. One possibility that it's not working for you might be you're not using the textbox with the rightclick code written. If grid somehow forced for a rebuild (ie: columncount=-1 and assign a new recordsource) your textbox is gone. Column uses default textbox.
Another possibility might be with your enable/disable code. If you enable/disable the grid itself enabled property is set hierarchically for all controls contained. But if you do it with something like .SetAll('Enabled',.f.,'Textbox') grid itself is enabled while the textboxes are not.
Yet another possibility there is a transparent object like shape,container in front of grid intercepting mouse events.
In any case I'd first check if other mouse events are working for the textbox or not (Click,MouseMove etc). Also temporarily I'd put something in its tag property (ie:'This is my textbox') for debugging purposes. In afterrowcolchange put code like :
LPARAMETERS nColIndex
WITH this.columns(nColIndex)
with eval('.'+.CurrentControl)
wait window timeout 2 IIF(EMPTY(.Tag),'no info',.Tag)
ENDWITH
endwith
dodefault(nColIndex)
PS: If grid columns are reordered nColIndex wouldn't work right for your column. Step into all columns to check.
Cetin