phoContextMenu - cCJGrid
Provides a handle to the grid's row context menu
Type: Property
Access: Read/Write
Data Type: Handle
Parameters: None
Syntax
Property Handle phoContextMenu
| Access Type | Syntax |
|---|---|
| Read Access: | Get phoContextMenu to HandleVariable |
| Write Access: | Set phoContextMenu to HandleVariable/Value |
Description
phoContextMenu contains the handle of the grid's row context menu. This handle is set initially when the grid object is created. Within the object's constructor, the function CreateContextMenu is called and the handle returned from this function is assigned to phoContextMenu. You can set phoContextMenu in your object to assign your own custom context menu.
When the user right clicks on a data cell, phoContextMenu contains the handle of the context menu to be displayed. Before this menu is displayed, the column function ContextMenu is called. It is passed the value of phoContextMenu and it returns the object handle to actually be used. This allows grid column object to supply custom context menus at the column, or even the cell, level. See the cCJGridColumn ContextMenu function for a complete description of the context menu display process.
The context menu display logic is handled by the OnComRowRClick event.
The cCJGrid class has no default context menu. The cDbCJGrid is assigned a default data-entry context menu (Find, Save, Delete, Clear, etc.).
A similar mechanism is used for when you right click on a grid header, which uses the phoHeaderContextMenu property.