Enabling the Open Context Menu Item

Tree nodes (rows) in the Tree Grid View have a default context menu with the Open menu item for opening the associated Item. This menu item is not enabled by default for the Tree Grid View Definition because the associated rows in the Tree Grid View Definition could be combined and thus reference more than one Item; see the Aras Innovator – Tree Grid View Administrator Guide for more information.

To enable the Open menu item to open the associated Item in the Tree Grid View:

  1. Make sure that the id Property of the ItemType is included in the Query Definition (see Section Adding Properties). The id is required to identify the specific Item to open when the action associated with the View menu is executed.
  2. Make sure the Data Template for the row in the Tree Grid View Definition includes the reference to the Item ID. The software that executes the Open function requires the ItemType and the ID of the specific Item to open the associated Form. For this, a data template is used by the Tree Grid View. This JSON template is defined within the Data Template for each row in the Tree Grid View Definition. The format of this JSON string is as follows:

a. id: ID of the Item to open

type: ItemType name of the Item to open

An example Data Template is:

{"id": “{CAD.id}”, “type": “CAD"}

Note the use of brackets - ‘{‘ and ‘}’ - in the string. The brackets around the string CAD.id is used to extract the id of the Item associated with the row in the Tree Grid View when it is populated in the User Interface. All other strings are static.

Creating a list of Product Occurrences: It is possible to customize the Tree Grid View to support the display of instances by using the Tree Grid View ability to combine rows. The ability to synchronize the combined rows between the Tree Grid View and the Dynamic/Streaming Viewer relies on the reference path of the instance.

The following steps outline the process of configuring CAD for Instance Synchronization between the Tree Grid View and Dynamic/Streaming Viewer using the default Query and Query Processor:

The following steps outline the process to display instances:

  1. Create a Tree Grid View Definition:

    1. Go to the Table of Contents and select Administration.
    2. Select Configuration.
    3. Select Tree Grid View Definitions, and click Create New Tree Grid View Definition.
    4. Fill in the Name field.
    5. Fill in the Description field.
    6. Select the default View3D_CAD Query Definition.
    7. Click Save.
  2. Modify the Tree Grid View:

    1. Click the Editor in the sidebar.
    2. Select the first four rows (CAD, CAD Structure, CAD Instance CAD), right-click, and click Map.

    3. Select the second, third, and fourth rows (CAD Structure, CAD Instance, CAD), right-click, and click Combine.

    4. Select the first row (CAD), right-click, and click Cell Display Settings.

    5. Select CAD.Keyed Name.
    6. Select the second row (CAD Structure – CAD Instance – CAD), right-click, and click Cell Display Settings.

    7. Select CAD.Keyed Name.
    8. Optional: select an icon for the row.

  3. Turn on Structure Resolution:

    1. Click Map Parameters
    2. Select the Visibility check-box next to the StructureResolutionMode parameter.
    3. Set Data Type to List.
    4. Set Data Source to qry_StructureResolution.
    5. Click Save to close the Map Parameters dialog.
    6. Click Done.
  4. Create a Dynamic View Definition:

    1. Go to the Table of Contents and select Administration.
    2. Select Configuration.
    3. Click Dynamic View Definition and click Create New Dynamic View Definition.

    4. Fill in the Name field.
    5. Select the Tree Grid View Definition created in Step 1.
    6. Select a specific viewer (Dynamic or Streaming Viewer) in View With field.
    7. Select the default dpn_GraphAPIQueryProcessor data processor Method.
    8. Click Done.
  5. Open a CAD Assembly and select the Dynamic View Definition created