Category Rows
- 2 minutes to read
Category Rows are used to organize logically related rows into groups. The Category Row is comprised of one header cell and provides descriptive information about a group of related rows.
In the case of organizing related rows into categories they must be added to the corresponding category rows as children. If this is performed end-users can expand and collapse category rows at runtime, thus showing and hiding rows belonging to a specific category. This allows you to provide a more representative look and feel for the vertical grid control and facilitates searching.
The image below displays the expanded and collapsed category.
Note
Category Rows do not necessarily reside at the first level within the grid control. They can also be child rows of other rows. You can provide sub-categories within a category, for instance. Please refer to the Creating A Tree-like Structure Of Rows topic for details on how to implement hierarchical row structures within a vertical grid.
Features of Category Rows
Settings that manage the Category Row (represented by the TcxCategoryRow class) can be divided into four groups. The following classes represent these groups:
The TcxCustomRow class provides properties common to all types of rows published in its subclasses including the properties TcxCategoryRow.Properties and TcxCategoryRow.Styles that represent settings custom to the Category Row.
The TcxRowOptions class provides options common to all types of rows. The TcxCategoryRow.Options property references the TcxRowOptions object.
The TcxCaptionRowProperties class provides settings that define the behavior of the Category Row. The TcxCategoryRow.Properties property references the TcxCaptionRowProperties object.
The TcxCategoryRowStyles class provides style settings. The TcxCategoryRow.Styles property references the TcxCategoryRowStyles object.
Note
The TcxvgOptionsView.CategoryExplorerStyle property of the Boolean type has influence on the Category Row style. You have a choice to paint the Category Row in XP style (if Windows XP is used) or tree view like style. Assign this property the True value to paint the Category Row in XP style. In this case the TcxCategoryRowStyles.Header settings will be overridden.
If you prefer tree-like view style set this property to False.
The following image demonstrates the settings of Category Rows in the Object Inspector at design time: