### Adding Expressions to the GridControl

For label templates, you can add expressions into a GridControl by following this process:

1. Add the GridControl to the template.

2. Set the LabelType property so that it matches the context in which the expression will be used. For example, if you'll be using the expressions to take data from a feature variable or dimension variable, you would select Variable.

3. Double-click to activate the GridControl and then click within a cell until it becomes selected with a blue highlight.

4. A this point you have two options, you can type or paste a known expression into that cell or you can select an expression from a list of available expressions.

5. To select the expression from the list, right-click on the Grid Cell.

6. Select Expression from the Cell type drop-down list. The Expression Editor dialog box appears.

7. Use this dialog box to select and add parameters to the expression (see the dialog box description below):

   1. Click the Select button. From the Expression Editor-dialog box, select the desired category from the Select a category drop down list.

   2. Select the expression from the Select a function list.

   3. As required, select parameter values.

   4. Click OK.

8. The selected expression appears within the grid cell.

See the "Expressions List" topic for a list of available expressions.

Expression Editor Dialog Box Description

Expression Editor

1. The Expression box displays a preview of what the selected expression will look like with the chosen parameters.

2. The box next to the Go button lets you search for an expression.

3. The Go button searches for the expression typed in the box and returns the expression, selecting it and displaying its parameters.

4. Selecting an item from this drop down list shows the expressions assigned to that category. Available categories are: General, ChartType, FeatureRelative, and AxisParameter.

5. This list displays the expressions (or functions) assigned to the selected category. Selecting an item shows any parameters in the bottom half of the dialog box.

6. This box displays any special instructions to use the expression.

7. This lower half of the dialog contains drop down lists allowing you to select values for the different parameters used by the expression. As you select items in these lists, the preview of the expression appears in the Expression box. Parameters are described in the "Expressions List" topic.