A newer version of this page is available. Switch to the current version.

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; }
<DefaultValue("{0}: [#image]{1} {2}")>
<XtraSerializableProperty>
<DXCategory("Appearance")>
Public Overridable Property GroupFormat As String

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).

See Also