CGXGridCore::SetFrozenRows

virtual BOOL SetFrozenRows(ROWCOL nFrozenRows, ROWCOL nHeaderRows, UINT flags = GX_UPDATENOW, GXCmdType ctCmd = gxDo);

nFrozenRows

Specifies the number of rows to freeze.

nHeaderRows

Specifies the number of rows to be used as column headers.

flags

Specifies the update technique. See UpdateFrozenRows 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.

Remarks

Overridable command for specifying the number of frozen rows and rows to be used as column headers.

The number of frozen rows and rows to be used as column headers is stored wth StoreFrozenRows. The display is updated with UpdateFrozenRows.

Frozen rows are rows which will never scroll out of the window. They are fixed at the top of the grid.

Column headers are rows which will be used to display titles for columns. They typically have a 3d-look.

Please note that numbering begins with zero. This means if you set nFrozenRows = 0 and nHeaderRows = 0 that there will still be one column header.

If you want to hide the first column header, you should call HideRows(0,0).

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

Example

This example shows you how to use two rows for column headers:

// use 1 extra columns as headers ( + standard header at row 0)
SetFrozenRows(1, 1);
// Do not draw column headers pressed when moving the current cell
GetParam( )->GetProperties( )->SetMarkColHeader(FALSE);
// Some column headers shall span over several columns
SetCoveredCellsRowCol(0,2,0,4);
// This gives you a look like this:
// |------|----------------|-----|-----|
// |A     |  Group of Cols |  E  |  F  |
// |      | 1 |  2  |  3   |     |     |
// |------|----------------|-----|-----|

See Also

 CGXGridCore::GetFrozenRows  CGXGridCore::StoreFrozenRows  CGXGridCore::UpdateFrozenRows  CGXGridCore::LockUpdate  CGXGridCore::HideRows

CGXGridCore

 Class Overview |  Class Members