RAD Studio |  |

Decision Grid Properties
See Also
Collapse All

The decision grid component, TDecisionGrid, displays data from the TDecisionSource component bound to TDecisionSource. By default, data appears in a grid with category fields on the left side and top of the grid.

The following are some special properties that control the appearance and behavior of decision grids:

- TDecisionGrid has unique properties for each dimension. To set these, choose Dimensions in the Object Inspector, then select a dimension. Its properties then appear in the Object Inspector: Alignment defines the alignment of category labels for that dimension, Caption can be used to override the default dimension name, Color defines the color of category labels, FieldName displays the name of the active dimension, Format can hold any standard format for that data type, and Subtotals indicates whether to display subtotals for that dimension. With summary fields, these same properties are used to changed the appearance of the data that appears in the summary area of the grid. When you're through setting dimension properties, either click a component in the form or choose a component in the drop-down list box at the top of the Object Inspector.
- The Options property of TDecisionGrid lets you control display of grid lines (cgGridLines = True), enabling of outline features (collapse and expansion of dimensions with + and - indicators; cgOutliner = True), and enabling of drag-and-drop pivoting (cgPivotable = True).
- The OnDecisionDrawCell event of TDecisionGrid gives you a chance to change the appearance of each cell as it is drawn. The event passes the String, Font, and Color of the current cell as reference parameters. You are free to alter those parameters to achieve effects such as special colors for negative values. In addition to the DrawState which is passed by TCustomGrid, the event passes TDecisionDrawState, which can be used to determine what type of cell is being drawn. Further information about the cell can be fetched using the Cells, CellValueArray, or CellDrawState functions.
- The OnDecisionExamineCell event of TDecisionGrid lets you hook the right-click-on-event to data cells, and is intended to allow a program to display information (such as detail records) about that particular data cell. When the user right-clicks a data cell, the event is supplied with all the information which is was used to compose the data value, including the currently active summary value and a ValueArray of all the dimension values which were used to create the summary value.

See Also

Creating Decision Grids

Using Decision Grids

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!