Skip to main content
A newer version of this page is available. .

GridView.GroupFormat Property

Gets or sets the format rule that specifies a template for group row captions. You can build this template from custom text strings and the following placeholders:

  • {0} - the group column caption;
  • {1} - the group column display text;
  • {2} - the group row summary text;
  • [#image] - the group row image.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v19.2.dll

Declaration

[DefaultValue("{0}: [#image]{1} {2}")]
[XtraSerializableProperty]
[DXCategory("Appearance")]
public virtual string GroupFormat { get; set; }

Property Value

Type Default Description
String "{0}: [#image]{1} {2}"

A string value specifying the text pattern for group rows.

Remarks

The {1} placeholder returns the group column’s display text. A raw cell value transforms into a display text in multiple ways.

The image below shows the Grid View whose GroupFormat property is set to the default value.

GroupFormat

Use the GridView.GetGroupRowDisplayText method to return the currently displayed group row text.

The GroupFormat property affects all group rows in a View. You can also handle the GridView.CustomDrawGroupRow event to modify individual group rows’ captions (for instance, to add HTML tags).

The following code snippets (auto-collected from DevExpress Examples) contain references to the GroupFormat property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also