Configure a data grid
Configure a data grid to display data from a project node or a database.
- In Project view, in UI, right-click a container and then select .
-
In Properties, create a dynamic link between the Model property and a node.
Selected node Combo box Database object Values contained in database tables. Project node Values of attributes or properties of all direct child nodes. For more information about dynamic links, see Create dynamic links.
-
(optional) Specify the kind of items to display in the object by setting ItemKind.
Tip:
The ItemKind property is automatically set with the object or variable type recognized among the child nodes.
For example, if the model is based on a folder node that contains several instances of a Motor object type, ItemKind is automatically set with the reference to the Motor type. In this case, the values that display are the attributes or properties of different instances (Motor1, Motor2, Motor3, and so on).
-
Add columns to the grid by selecting
next to Columns.
- Configure columns by setting the Text and Title property values.
-
(optional) In Events, associate Selection changed with the Refresh method.
The items contained in the object refresh each time you interact with it.
- (optional) Sort items by setting Sort order and Order by values.