RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDecisionSource.GetGroupExtent Method

Returns the range of cell indexes for a single value of a dimension.

Pascal
function GetGroupExtent(dimGroup: TDimGroup; Index: Integer; Cell: Integer): TDimRange;
C++
__fastcall TDimRange GetGroupExtent(TDimGroup dimGroup, int Index, int Cell);

Call GetGroupExtent to find the range of cells in a decision grid that has the same value on a given dimension as the cell specified by the Cell parameter. 

Cell is the index of the row or column containing the cell, where 0 specifies the first row or column in the data area of a decision grid. 

If dimGroup is dgRow, Cell identifies a row of the grid. If dimGroup is dgCol, Cell identifies a column of the grid. Do not use other values for dimGroup. 

Index specifies the row-specific or column-specific index of the dimension. 

For example, if a decision grid has two row dimensions listed in the first two columns of the decision grid, the line

MyRange := GetGroupExtent(dgRow, 0, 3);

 

MyRange = DecisionSource1->GetGroupExtent(dgRow, 0, 3);

sets MyRange to the range of row indexes for cells that have the same value on the first row dimension as the third cell. The number of cells in this range is the same as the value returned by GetDimensionMemberCount for the second open row dimension. The line

MyRange := GetGroupExtent(dgRow, 1, 3);

 

MyRange = DecisionSource1->GetGroupExtent(dgRow, 1, 3);

sets MyRange to the range from 3 to 3, because the second row dimension is the innermost row dimension, so each value is represented by a single row.

Note: If the dimension includes subtotals, the subtotal cell is included in the range returned by GetGroupExtent.
 

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