Configuration Examples
Copy
This section contains examples of how to configure buttons, context menus, toolbars, and Tree Grid rows to use in Tree Grid View. The configuration items in this section are examples of advanced functionality.
You can use the Data Template to select data to be used for Configurable User Interface (CUI) handlers. The following example shows the data template associated with a Part:
You can add or change icons in either Tree Grid View or Query Builder. In the following example, icons identify both Part BOM and User in a query:
You can use the Change Icon Template to change the icons that appear. Use the following procedure:
- Right-click the first row in the grid. The context menu appears.
- Click Change Icon. The Image Browser dialog box appears.
- Click Icon Template and then click {Part.thumbnail} in the Helper area to change to the {.} icon.
- Return to the Part Grid and right-click the Part BOM row.
- Click Change icon in the context menu. The Image Browser dialog appears.
- Click Innovator and then click an icon.
The following procedure is an example of how to create a configurable button:
- Click the PresentationConfiguration ItemType in the grid, click the TOC Access tab, and add Administrators.
- Open the TOC and click Presentation Configuration.
- Click CreateNew Presentation Configuration. The Presentation Configuration form appears.
- Enter tgv_part in the Name field and select a color such as orange.
- Enter tgv* in the Name cell of the Search grid and add the tgv_part_toolbar and tgv_part_ContextMenu Items:
- Make sure to add the Items to the relationship grid.
- Add an identity to the For Identity column. The specified Identity determines which users have access to the buttons and menus.
- Right-click tgv_part_toolbar and select Open from the context menu:
- The tgv_part_toolbar presentation configuration item appears. It contains the tgv_view button.
- Select Button and click OK to add it to the command bar.
- Right-click the Item to access the context menu and click Open. The tgv_view Presentation Item appears.
Click the New Command Bar
in the Command Bar Section relationship tab to add a new related Item.
Click the
button to save the tgv_part Presentation Configuration Item.
Click the New Command Bar Item
button in the Command Bar Item tab. The Select Item Type dialog appears:
Additional logic can be added to the context menu or toolbar items when they are initialized by adding an Init Method. Users can review the rb_viewItemHandler Method code and develop similar code for their own uses.
Adding an Image to a Button
You can select an image for the toolbar button you created using the following procedure:
- Click the Image button and click the Select an image link. The Image Browser dialog appears.
Select the appropriate image and click the
button.
Click
to save the Presentation Configuration.
Linking a Presentation Configuration to a TGV Definition
Once you save the Presentation Configuration you need to link it to a Tree Grid View definition before you can use it. Use the following procedure:
- Go to Contents --> Administration --> Configuration --> Tree Grid Views and click the Search button. A list of Tree Grid views appears in the search grid.
- Click Part TGV.
- Click the ellipses in the Linked Toolbar/Context Menu field. The Presentation Configuration search dialog appears.
- Save the Tree Grid View.
- Load an Item configured for TGV to see the new toolbar button. For example, Figure 47 shows a Part Item.
Select tgv_part and click
.
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.
- The tgv_part_context_menu Item appears.
- Click Create New Presentation Configuration. The Presentation Configuration Item appears.
- Enter tgv_part in the Name field and select the orange color.
- Enter tgv* in the Name cell of the search grid and add both tgv_part_toolbar and tgv_part_ContextMenu Items.
- Make sure to add the Items to the Relationships grid.
- Add an identity in the For Identity column. This Identity determines which users will have access to the buttons/menus.
- Right-click tgv_part_toolbar and select Open from the context menu.
- 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.
Click
to edit the tgv_part_context_menu Item.
Click the New Command Bar
button in the Command Bar Section to add a new related Item.
Click
to save the tgv_part Presentation Configuration Item.
The tgv_part_toolbar Presentation Configuration Item appears. It contains the tgv_view button.
Click the New Command Bar
button in the Command Bar Item tab. The Select Item Type dialog appears.
The rb_viewItemInitHandler Method is used to determine whether or not the data template is valid.
You can determine the number of rows that appear in a Tree Grid view using one of the following methods:
Click the Grow
button to temporarily expand the view.
- Select the Auto Grow On Refresh checkbox to keep the view expanded.
These methods are described in more detail in the following sections.
Expanding Tree Grid Rows Using the Grow Icon
Use the following procedure:
Click the Grow
button to expand the view. The number of levels that appear is determined by the value you enter in the Grow depth field.
- Click the Show More link to further expand the number of related Items at any level.
- You can change the number of levels that appear in the grid either by either entering a different value in the Grow depth field or by editing the related Tree Grid View definition.
Any changes you make in the Max Visible Children on Expand and Max Grow Levels fields automatically appear in the associated item screen. For example, if you change the value in the Max Grow Levels field to 4, it will appear in the Grow Depth field for the associated Part:
Using Auto Grow on Refresh
The Auto Grow on Refresh check box appears on the Tree Grid View form.
Selecting this checkbox keeps the Tree Grid View expanded to the default level whenever you do a refresh. The Max Grow Level property value is used when you:
- Open the tab that displays the Tree Grid View.
- ClickApply on either the Display Settings or Modify Parameters dialog boxes.
Click
.
The Grow Depth value displayed on the tab is used when you:
Click the following toolbar buttons:
,
,
,
.
Click the
button and then click Create New Revision in the drop-down menu.
Clicking the Display Settings
or Parameter Mapping
buttons also initiates a refresh.
If you do not select the Auto Grow on Refresh check box, the Tree Grid view maintains the default behavior of contracting the Tree Grid view on refresh.
Collapsing Tree Grid Rows
Use the following procedure:
- Select a row in the Tree grid view.
Click the Trim
button to collapse the rows.
The Display Settings dialog enables you to change the way information is displayed in the Tree Grid View. Use the following procedure:
- Go to Contents --> Design --> Parts. In this example, we use RootPart.
- Click the Display Settings button. The Display Settings dialog appears with the Tree Grid view configuration.
- Enter a number in the Max Visible Children on Expand field to change the number of child nodes that are returned when the parent Item is expanded.
- Click Apply. The grid is refreshed.
- Click Grow. The grid does not show the related Items; it only shows the Part BOM Relationships.
Click the Toggle Visibility
button for a related Item to turn it off. The selected Item is highlighted and grayed out. In the example below, the selected part has a recursive association which is also turned off.
Once you have created the Query Definition and configured the Tree Grid View, click the Show Parameter Mapping
button. The Map Parameters dialog box appears:
Click the green arrow to make the doc_state parameter visible to users in the Tree Grid View. Administrators can also modify the parameter mapping and choose alternative values for the Label and Default Values fields. The Data Type List field is similar to the properties assigned to ItemTypes.
When a query has been running for several seconds, a splash screen similar to the following appears with the Cancel button that, when selected, will stop the request and terminate any server-side processes used to execute the query.
Support for the following cell view data types has been added in Aras Innovator 33:
- List
- Boolean
- Floating Point
- Integer
- Date enhancements for Short/Long Date/time formatting
Using the List Cell View Type
You can use the List Cell View Type to create list properties in a Tree Grid View as shown in the following procedure:
- Click the Show Editor button to view the parameters.
- Right-click an entry in the Authoring Tool column and select Cell Display Settings
- Select List in the Cell View Type drop-down list and enter the name of the list in the List Name field. When applying the List data type, the List Item label will appear in the Tree Grid View.
- Click Save. Figure 74 shows the result when displaying a List Property.
Using the Boolean Cell View Type
The following example shows how to use the Boolean Cell View Type. The example uses the sample PE_CAD_ReverseItemsPart Tree Grid View Definition:
- Click the Show Editor button to view the parameters:
- Right-click an entry in the Changes column and select Boolean in the Cell View Type drop-down list:
- Click Save.
Using the Decimal Cell View Type
The following example shows the use of the Decimal Cell View Type. This Cell View Type enables the user to specify a Precision and Scale for an associated Double or Floating Point property type. In this example, the Cost column in the TGV Definition refers to the Cost property in the associated QD:
- Right-click an entry in the Cost column and select Decimal in the Cell View Type drop-down list.
- Enter appropriate values in the Precision and Scale fields and click Save.
Using the Float Cell View Type
The following example also uses the PE_CAD_ReverseItemsPart TGV. This example contains a QD that refers to the Cost floating point property.
- Click the Show Editor button to view the parameters.
- Right-click an entry in the Cost column and select Float in the Cell View Type drop-down list.
Using Date or Time Cell View Types
The Date cell view type now supports the short date, long date, and date with time formats for date properties. A secondary selection drop-down menu is automatically displayed when the Data Cell View Type is selected initially.
In this example, the created_on date type property is displayed as the Long Date Time Cell View Type. The results appear as shown in Figure 81.
Selecting Short Date does not provide enough information; see Figure 82.
In this example, the created_on date type property is displayed as the Long Date Time Cell View Type. The results appear as shown in Figure 83.
Using the Integer Cell View Type
The Integer Cell View Type provides an alternative to the conversion of numeric values to text for display in the Tree Grid View. Using Integer, a value is sorted numerically (ascending or descending) unlike Text, whose resulting values are sorted numerically instead.
A common usage for Integer is Version (generation).