Skip to content

Instance Editor and Grid

Simon Mourier edited this page Feb 19, 2020 · 1 revision

There are two editors that you can use to edit instances of an entity:

  • The Instance Editor, accessible using the entity Ribbon Bar or the design surface context menu “Add Instance” item.

  • The instance Grid, accessible only using the entity Ribbon Bar.

Instance Editor

When you click on “Add Instance”, you will be presented a resizable dialog box like this one:

Instance Editor - Picture 85

This dialog box has a “Values” tab that contains a property grid that allows you to modify the instance properties, according to the current entity properties definition. Each line is associated with an entity property and the editor is related to the property type. In the example above, since the “VehicleStatus” property type is an enumeration defined in the project, the editor is a drop-down list containing the list of values defined in the enumeration type.

The “Unmapped Values” tab corresponds to instance values that have been added previously for which there’s no corresponding property anymore. These unmapped values can only be seen and removed.

After the instance has been added, it’s displayed in the entity shape, in the “Instances” folder, like this:

Instance Editor - Picture 86

By default, the instance is displayed using the entity key instance value (“1” in this example). This can be changed as shown in the following image:

Instance Editor - Picture 87

You must first select the property that will be used to display instances, then go to the Visual Studio property grid and change the “Is Entity Display” attribute to True. Now the instance tree view item should use the value of the property that is defined as the “entity display” (in our example, the “SerialNumber” property has the “19662403” string value).

Instance Grid

When you click on “Instances Grid” in the Ribbon Bar with an entity selected, you will be presented a resizable dialog box like this one:

Instance Grid - Picture 88

This is like a spreadsheet viewer and editor over the list of instances for the selected entity. The grid editors are the same as used in the Instance Editor.

You can use the keyboard like in other grids to edit instances: arrows keys to navigate between cell, F2 to enter edit mode, F4 to open the editor if any, etc.

Note: the editor for instance value of type System.Guid (or guid) allows you to create new guids, or use the empty guid, or increment the current guid: Instance Grid - Picture 156

 

Clone this wiki locally