<< Return to Main Index

< Return to Class Index

CGXCommand::Execute

virtual BOOL Execute(CGXGridCore* pGrid, GXCmdType cType) = 0;

pGrid

A pointer to the grid.

cType

Specifies if the executed command should be undone (gxUndo), redone (gxRedo), or rolled back (gxRollback).

Return Value

TRUE if command could be successfully undone; FALSE otherwise.

Remarks

Called to undo the operation. You should override this method in your CGXCommand-derived class to perform the undo operation.

Example

This example shows you how you can override this method:

BOOL CGXSetFrozenRowsCmd::Execute(CGXGridCore* pGrid, GXCmdType ctCmd)
{
   return pGrid->SetFrozenRows(m_nFrozenRows, m_nHeaderRows, GX_UPDATENOW, ctCmd);
}

See Also

CGXCommand::CGXCommand

CGXCommand

Class Overview | Class Members