CGXFormulaSheet::StoreMoveCells
virtual BOOL StoreMoveCells(CGXRange rg, ROWCOL nRow, ROWCOL nCol, CObject*& pUndoInfo, BOOL bCreateUndoInfo, int ctCmd);
rg
Specifies the source range of cells.
nRow
Specifies the destination row coordinates.
nCol
Specifies the destination column coordinate
pUndoInfo
A reference to a pointer that will receive undo information generated by the formula engine.
bCreateUndoInfo
TRUE if undo information should be created in the formula engine.
ctCmd
Contains the ctCmd setting of the calling method (see CGXGridCore::MoveCells).
Return Value
TRUE if the operation was successful ; FALSE otherwise
Remarks
Moves cells from a given source range to a new destination, e.g. when the user performs a cut/paste operation. Cell references in formula expressions that depend on cells in the moved range will be adjusted.
Effects of Moving Cells
-
When you move a cell that is referenced by a formula, Objective Grid automatically updates the formula for the new location, even if the cell reference is absolute.
-
When you move a cell in a range that is referenced by a formula, the formula still references the original range. However, if you move a corner cell of the range, Objective Grid extends or contracts the range to match the new location.
-
If you move a cell range that has been named, or one referenced in a formula, Objective Grid automatically updates the definition of the range name or the formula reference to reflect the new location.
- If you move part of a cell range that has been named or referenced in a formula, it can cause problems. Objective Grid updates range names and references only when you move one or more corner cells of the range. If you move cells in the interior of the range, Objective Grid will not change the range name or any references to it
See Also
CGXGridCore::MoveCells CGXGridCore::m_nClipboardFlags