Chapter 19. Context Menus

Chapter 19. Context Menus

Detail windows and task panes discussed above are shown in the SelectionChange event.

We may add such queries and much more to the context menu.

Let's add the following configuration to the EventHandlers table (two lines at the bottom):

ContextMenu handlers used to configure the Excel context menu

Then let's switch to the payments workbook, select the Payments worksheet, click Reload, Reload Data and Configuration, and right click on a row:

Sample of the configured Excel context menu

When we click on the Company Payments item, the add-in shows the task pane like this:

Sample of the drill-down query

 

As we learned above, the SelectionChange and ContextMenu handlers are nearly the same.

They get parameters from the columns of the active row. They differ by the EVENT_NAME configuration.

However, the ContextMenu handlers support additional configuration parameters like MENU_ORDER and EDIT_PARAMETERS:

MENU_ORDER and EDIT_PARAMETERS fields use to tune the ContextMenu handers

and allow using much more handler types:

Supported handler types

You may configure executing stored procedures, SQL codes, macros, CMD commands, opening URLs.

Use the MenuSeparator type to separate menu items.

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.OK