RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDecisionSource.GetValueIndex Method

Returns the index of a single dimension value that corresponds to a cell in a decision grid.

Pascal
function GetValueIndex(dimGroup: TDimGroup; Index: Integer; Cell: Integer; var isBreak: Boolean; var isSum: Boolean): Integer;
C++
__fastcall int GetValueIndex(TDimGroup dimGroup, int Index, int Cell, Boolean isBreak, Boolean isSum);

Call GetValueIndex to obtain the coordinate of a cell in a decision grid along the dimension specified by the Index parameter. The dimGroup parameter indicates whether the dimension is a row dimension (dgRow) or a column dimension (dgCol). Do not call GetValueIndex with dimGroup set to any other TDimGroup value. The Index parameter is the row- or column-specific index of the dimension. The first row or column dimension has an Index of 0, the second dimension has an Index of 1, and so on. The Cell parameter is the index of the cell row or column, where 0 specifies the first row or column in the data region of the grid. 

In addition to returning the index of the dimension value, GetValueIndex provides additional information about the position of Cell within the cells for the dimension. GetValueIndex sets isBreak to truewhen Cell is the first cell in the dimension group with the returned value on the specified dimension. GetValueIndex sets iSum to truewhen Cell represents a subtotal over the dimension. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!