Skip to main content

Card Category Row

  • 2 minutes to read

The intended purpose of a category row is organizing rows into logical groups in a card. With this capability, an end-user can easily delve into details or hide the unnecessary data by expanding or collapsing category rows.

Category Row

Any regular row in a card can be used as a category row. The only requirement is to set the row’s Kind property to rkCategory. As a result all rows, which follow that row, become its children.

A hierarchy of the resulting category is shown in a card in a tree-like manner. The expand button is drawn to the left of the category row caption, if the View’s OptionsCustomize.RowExpanding property is set to True, and the category row’s Options.Expanding property is also set to True. Expanding and collapsing of a category row can also be performed programmatically using the row’s Expanded property.

When coding, you can have access to children through the category row’s CategoryItems property. And any child of a category row provides access to its parent through its CategoryRow property.

The table below lists the main properties, which affect a category row and the related elements appearance:

Appearance

The View’s Styles.CategoryRow property – specifies styles for all category rows (and for their children indent) in a card. The row’s Styles.CategoryRow – specifies styles for a particular row (and for its children indent). Note: to make a style common to the entire row (to the caption and to the content parts), set the row’s Options.Editing property to False.

The View’s OnGetCategoryRowStyle and row’s OnGetCategoryRowStyle events are handy, if you are going to dynamically apply styles to all category rows in a card or to a particular category row.

The View’s OptionsView.CategoryIndent property – specifies the size of the category row’s children indent.

The View’s OptionsView.CategorySeparatorWidth property – specifies the width of the category row separator, which divides a category row and other rows.

The View’s Styles.CategorySeparator – specifies styles for separators of all category rows in a card.