RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDecisionGrid.CellDrawState Method

Retrieves information about a data cell in the grid.

Pascal
function CellDrawState(ACol: Integer; ARow: Integer; var Value: string; var DrawState: TDecisionDrawState): boolean;
C++
__fastcall boolean CellDrawState(int ACol, int ARow, AnsiString Value, TDecisionDrawState DrawState);

Call CellDrawState to obtain information about a cell in the scrollable data region of the grid. The ACol and ARow parameters specify the index of the cell, where (0,0) is the upper left cell in the data region, not the upper left cell in the grid. The Value parameter returns the value of the summary in the cell, formatted for display. The DrawState parameter returns information about the type of information contained in the cell. For more information about the possible values of DrawState, see the entry for the OnDecisionDrawCell event. 

CellDrawState returns true if the Value and DrawState parameters are correctly filled in. CellDrawState returns false if the cell specified by ACol and ARow is not in the data region of the grid. 

The ADrawState parameter indicates the type of cell that is about to be drawn. ADrawState includes one or more of the following values:

Value 
Meaning 
dsGroupStart  
The cell is the first row or column label for a dimension. Always appears with dsRowValue or dsColValue.  
dsRowCaption  
The cell displays a row caption (the name of a dimension whose values are listed down a column on the left of the grid).  
dsColCaption  
The cell displays a column caption (the name of a dimension whose values are listed along the top of the grid).  
dsSum  
The cell displays a subtotal label or value. Always appears with dsRowValue, dsColValue, or dsData.  
dsRowValue  
The cell is a row label. It represents a value from a dimension listed down a column on the left of the grid or a summary label that appears at the end of each group of dimension values.  
dsColValue  
The cell is a column label. It represents a value from a dimension listed across the top of the grid or a summary label that appears at the end of the dimension.  
dsData  
The cell is in the scrollable data region of the grid.  
dsOpenAfter  
The cell has a plus sign (+) on the right that will open following dimension when clicked. Always appears with dsRowCaption, dsColCaption, dsRowPlus, or dsColPlus.  
dsCloseAfter  
The cell has a minus sign (-) on the right that will close the following dimension when clicked. Always appears with dsRowCaption, dsColCaption, dsRowPlus, or dsColPlus.  
dsRowIndicator  
The cell appears on the left grid margin that is used to display the open and close indicators (+ and -).  
dsColIndicator  
The cell appears on the upper grid margin that is used to display the open and close indicators (+ and -).  
dsRowPlus  
The cell appears in the left margin and contains a plus sign (+) indicating that the adjacent dimension is closed. Always appears with dsRowIndicator.  
dsColPlus  
The cell appears in the top margin and contains a plus sign (+) indicating that the adjacent dimension is closed. Always appears with dsColIndicator.  
dsNone  
The cell has no function.  

 

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