>>>Throughout my application I have RightClick menus on my grids where the user can add, edit or delete. If the user RightClicks on an empty grid, their only option is to add. This worked fine in VFP6, but in VFP7 I notice that I can't RightClick on an empty grid. Instead, the RightClick of the pageframe (most of these grids are on pages on pageframes) fires. It seems that the empty grid can't get focus. What can I do???
>>
>>Yes Elyse,
>>It doesn't get the focus :(
>>You could have code in page rightclick like this :
>>
>>loObj = SYS(1270)
>>IF UPPER(loObj.BaseClass) = 'GRID'
>> loObj.RightClick()
>>endif
Cetin
>
>Thanks! For some reason my loObj was coming up as a column so I put in a check for that as well and it seems to work.
Elyse,
Sorry forgot to mark you for CC. loObj.parent might be dangerous. See my reply to John for a more generic routine.
Cetin