CExtGridWnd::GridCellGet

Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

Returns a pointer to the cell object at a specified location. The returned value may specify an inner cell object or an outer cell object, or be equal to NULL. The first two prototypes use column/row indices and types to specify the location. The latter two use the hit-test object which holds both column/row indices and types. If there is no object associated with the cell, the method allows you to assign a new object for this cell in two ways. The first is to set the pInitRTC pointer to the runtime class object for the required cell type. The alternative way is to set the bAutoFindValue to true (pInitRTC should be NULL). In this case, the new cell object will be copied from the default object associated with the given row or column.

virtualCExtGridCell * GridCellGet(
   LONG nColNo,
   LONG nRowNo,
   INT nColType = 0,
   INT nRowType = 0,
   CRuntimeClass * pInitRTC = NULL,
   bool bAutoFindValue = true,
   bool bUseColumnDefaultValue = true
);
constCExtGridCell * GridCellGet(
   LONG nColNo,
   LONG nRowNo,
   INT nColType = 0,
   INT nRowType = 0,
   CRuntimeClass * pInitRTC = NULL,
   bool bAutoFindValue = true,
   bool bUseColumnDefaultValue = true
) const;
CExtGridCell * GridCellGet(
   const CExtGridHitTestInfo & htInfo,
   CRuntimeClass * pInitRTC = NULL,
   bool bAutoFindValue = true,
   bool bUseColumnDefaultValue = true
);
constCExtGridCell * GridCellGet(
   const CExtGridHitTestInfo & htInfo,
   CRuntimeClass * pInitRTC = NULL,
   bool bAutoFindValue = true,
   bool bUseColumnDefaultValue = true
) const;

Parameters

nColNo
Column index.
nRowNo
Row index.
nColType
Type of the column (0 - inner column, -1 - outer column on left, 1 - outer column on right).
nRowType
Type of the row (0 - inner row, -1 - outer row at top, 1 - outer row at bottom).
htInfo
Specifies the hit-test object.
pInitRTC
Pointer to the runtime class object which should be assigned to the cell that hasn't had any associated object. It should specify the CExtGridCell class, a class derived from CExtGridCell, or be set to NULL.
bAutoFindValue
Specifies that the new cell object will be copied from the default object associated with the given row or column if bAutoFindValue is set to true. This feature is only available if the pInitRTC parameter is set to NULL.
bUseColumnDefaultValue
If set to true, specifies that the default cell object associated with the column should be used for the automatic creation of the cell object; otherwise, the default cell object associated with the row will be used. This parameter is used only when the bAutoFindValue is set to true and the pInitRTC parameter is set to NULL.

See Also

CExtGridWnd Overview | Class Members | Hierarchy Chart