Skip to main content

GridBand.ImageIndex Property

Use the ImageIdex option accessible in GridBand.ImageOptions to specify the index of the image displayed within the band header.

Namespace: DevExpress.XtraGrid.Views.BandedGrid

Assembly: DevExpress.XtraGrid.v25.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

[Browsable(false)]
[DefaultValue(-1)]
[DXCategory("Appearance")]
[EditorBrowsable(EditorBrowsableState.Never)]
[ImageList("Images")]
[XtraSerializableProperty]
public int ImageIndex { get; set; }

Property Value

Type Default Description
Int32 -1

A zero-based integer specifying the image by its index within the source collection. -1 if no image is displayed within the band header.

Remarks

The ImageIndex property specifies the index of the required image in the collection of images. The source of images is specified by the ColumnView.Images property.

The image below shows examples of band header and column header images.

ColumnHeader_Images

Tip

You can also assign an image by its name in the collection.

// The image collection is created and populated with images at design time.
barItem.ImageOptions.Image = imageCollection1["technology_32x32"]; 
// Assign an SVG image in the SvgCollection
// barItem.ImageOptions.SvgImage = svgCollection1["technology_32x32"];

Read the following help topic for more information: Access and Use DevExpress Icons in Code.

See Also