<< Return to Main Index

< Return to Class Index

CGXGridCore::InsertCols

virtual BOOL InsertCols(ROWCOL nCol, ROWCOL nCount, int* anWidthArray = NULL, CObArray* pCellsArray = NULL, CObArray* pColsArray = NULL, ROWCOL nRowCount = 0, UINT flags = GX_UPDATENOW, GXCmdType ctCmd = gxDo);

nCol

Specifies the column id.

nCount

Specifies the number of columns to be inserted.

anWidthArray

An optional pointer to an array with the column-widths for the inserted columns. If it is NULL, the inserted cells are initialized with the default column-width.

pCellsArray

An optional pointer to an array with the cell contents for the inserted cells. If it is NULL, the inserted cells remain empty.

pColsArray

An optional pointer to an array with the column-base-styles for the inserted columns.

nRowCount

Specifies the number of rows stored in pCellsArray. The size of pCellsArray should be nRowCount*nCount.

flags

Specifies the update technique. See UpdateInsertCols for more information.

ctCmd

Specifies if the executed command is undone (gxUndo), redone (gxRedo), executed the first time (gxDo) or rolled back (gxRollback).

Return Value

TRUE if the command has been successfully executed; it is FALSE if the command failed or if the user aborted the operation.

Remarks

Overridable command-method which inserts columns.

Columns are inserted with StoreInsertCols. The display is updated with UpdateInsertCols.

The command generates a CGXInsertColsCmd-object with undo-information.

The user can abort the operation.

See Also

CGXGridCore::StoreInsertCols CGXGridCore::UpdateInsertCols CGXGridCore::LockUpdate

CGXGridCore

Class Overview | Class Members