phoHeaderContextMenu - cCJGrid
Provides a handle to the grid's header context menu
Type: Property
Access: Read/Write
Data Type: Handle
Parameters: None
Syntax
Property Handle phoHeaderContextMenu
| Access Type | Syntax |
|---|---|
| Read Access: | Get phoHeaderContextMenu to HandleVariable |
| Write Access: | Set phoHeaderContextMenu to HandleVariable/Value |
Description
phoHeaderContextMenu contains the handle of grid's header context menu. This handle is set initially when the grid object is created. Within the object's constructor, the function CreateHeaderContextMenu is called and the handle returned from this function is assigned to phoHeaderContextMenu. You can set phoHeaderContextMenu in your object to assign your own custom context menu.
When the user right clicks on a header column, phoHeaderContextMenu contains the handle of the context menu to be displayed. Before this menu is displayed, the column function HeaderContextMenu is called. It is passed the value of phoHeaderContextMenu and it returns the object handle to actually be used. This allows grid column object to supply custom context menus at the column level. See the cCJGridColumn HeaderContextMenu function for a complete description of the context menu display process.
The context menu display logic is handled by the OnHeaderRightClick event.
The default header context menu allows you to invoke the field chooser and restore your header configuration (width, order and hiding) back to the original object layout.
A similar mechanism is used for when you right click on a grid row, which uses the phoContextMenu property