TreeListColumn.ImageIndex Property
Use the ImageIndex
propery accessible in TreeListColumn.ImageOptions to specify the index of the image from the TreeList.ColumnsImageList collection displayed in the column header.
Namespace: DevExpress.XtraTreeList.Columns
Assembly: DevExpress.XtraTreeList.v24.2.dll
NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList
#Declaration
[Browsable(false)]
[DefaultValue(-1)]
[EditorBrowsable(EditorBrowsableState.Never)]
[ImageList("Images")]
[XtraSerializableProperty]
public int ImageIndex { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Int32 | -1 | An integer value specifying the image by its zero-based index in the source collection. -1 to not display an image. |
#Remarks
To display images within column headers, first assign an image list to the TreeList.ColumnsImageList property. Then use a column’s ImageIndex property to assign the index of the required image within this list.
You can also use the Image
property accessible in TreeListColumn.ImageOptions to specify the column header image.
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.