A wrapped grid wraps a logical row between multiple absolute rows. You can assign each logical column a unique width. You can set the row breaks after any logical column.
This is useful when you want to restrict the horizontal width of the grid to avoid horizontal scrolling. The wrapped logical row binds the logical columns with better affinity and better readability than if it were a single long row.
Although not functionally related, the wrapped grid is also a hierarchical grid, and you can turn off the hierarchical functionality by configuring it.
To enable this functionality, derive your wnd/view class from the CGXWrappedGrid template.
For example:
class CWrappedGridView : public CGXWrappedGrid<CGXGridView> |
See Figure 135 for more information. Section 24.1.1, "Absolute Logical Coordinate Transformation," describes how to convert between logical and absolute cell coordinates.
Users can visually resize the column width of each column and also rearrange the column positions and row-breaks by selecting and dragging the column headers.
The wrapped grid implementation uses covered cells, so the user can change the width of individual cells. Each logical cell width is a multiple of the underlying absolute cell's width. If the absolute cell's width were 5 pixels (the default), then the logical cell's width could only be a multiple of 5. You can reduce the default absolute cell width with SetColWidthPrecision().
SetWGColCount()SetWGRowCount()
Sets the logical row/column count.
SetWGRowBreaks()
Sets row breaks after one or more columns within the logical row.
SetWGColWidth()
Sets the column width of one or more logical columns.
ResizeWGColWidthsToFit()/ResizeWGRowHeightsToFit()
Resizes the column and row to fit the values in the corresponding cells.
InsertWGCols()/InsertWGRows()
Inserts one or more cols/rows after a particular col/row.
RemoveWGCols()/RemoveWGRows()
Removes one or more cols/rows after a particular col/row.
MoveWGRows()/MoveWGCols()
Moves one or more cols/rows after a particular col/row.
SetWGColBaseStyle()/ SetWGRowBaseStyle()
Sets the column/row base style of a logical column/row.
In all functions defined in CGXGridCore, the row/column parameters denote the absolute coordinates. You should use the transformation APIs in the Hierarchy Grid to convert absolute coordinates to logical coordinates and the reverse.
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.