CGXGridCore::CanMergeCell
virtual BOOL CanMergeCell(CGXControl* pControl, ROWCOL nRow, ROWCOL nCol, const CGXStyle& style, int mtType);
pControl
Points to the control object associated with the cell.
nRow
Specifies the row id.
nCol
Specifies the column id.
style
Const reference to the style object with all style information for the cell.
mtType
-
Specifies type of merging:
- mtVert for vertical cell merging
mtHorz for horizontal cell merging
Return Value
TRUE if merging the cell is allowed; FALSE otherwise.
Remarks
Objective Grid calls this method to check if it is possible to merge a cell in the specified direction (vertical or horizontal).
CGXGridCore::CanMergeCell checks the CGXStyle::SetMergeCell attribute. If this attribute does allow cell merging, the method calls CGXControl::CanMergeCell. Depending on the cell type, CGXControl::CanMergeCell will allow merging cells.
By default all cell types support cell merging. Override CanMergeCell if you want to disable merging cells for certain cell types.
Control-Factory Specific ->
This method has been implemented using the abstraction mechanism as discussed in the chapter "Reducing the size of your application" in the user's guide. A call to the ImplementMergeCells method from within the control factory class' InitializeGridComponents method will make the concrete implementation of this method available to your application.
If no concrete implementation is available this method returns FALSE. No action is performed.
END Control-Factory Specific
See Also
CGXControl::CanMergeCell CGXStyle::SetMergeCell