Configuring a Context Menu
Copy
The following is an example of how to configure a context menu using custom code:
- Select the tgv_part Presentation Configuration Item, right click tgv_part_context in the Command Bar Section grid and select Open in the context menu.
Figure 48.
The tgv_part_context_menu Item appears.
Figure 49.
- Click
to edit the tgv_part_context_menu Item. - Click Create New Presentation Configuration. The Presentation Configuration Item appears.
- Enter tgv_part in the Name field and select the orange color.
Figure 50.
- Click the New Command Bar
button in the Command Bar Section to add a new related Item. - Enter tgv* in the Name cell of the search grid and add both tgv_part_toolbar and tgv_part_ContextMenu Items.
Figure 51.
- Make sure to add the Items to the Relationships grid.
Figure 52.
- Add an identity in the For Identity column. This Identity determines which users will have access to the buttons/menus.
- Click
to save the tgv_part Presentation Configuration Item. - Right-click tgv_part_toolbar and select Open from the context menu.
Figure 53.
The tgv_part_toolbar Presentation Configuration Item appears. It contains the tgv_view button.
Figure 54.
- Click the New Command Bar
button in the Command Bar Item tab. The Select Item Type dialog appears.
Figure 55.
- Select Menu and click OK. It appears in the Command Bar Item tab.
- Right-click the Menu ItemType and click Open in the context menu.
- Right-click tgv_part_menu in the Command Bar Item grid and select View Command Bar Item. The tgv_part_menu Presentation Item appears.
Figure 56.
The rb_viewItemInitHandler Method is used to determine whether or not the data template is valid.