Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeListAppearanceCollection.OddRow Property

Gets the appearance settings used to paint odd nodes.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

public AppearanceObject OddRow { get; }

#Property Value

Type Description
AppearanceObject

A AppearanceObject object that provides the appearance settings used to paint odd nodes.

#Remarks

The OddRow property specifies the appearance settings of data cells within odd nodes. If this property isn’t specified, the appearance of data cells within odd nodes is specified by the TreeListAppearanceCollection.Row property.

To specify the appearance of even nodes, use the TreeListAppearanceCollection.EvenRow property.

Note

The TreeListAppearanceCollection.EvenRow and TreeListAppearanceCollection.OddRow properties are in effect if the TreeListOptionsView.EnableAppearanceEvenRow and TreeListOptionsView.EnableAppearanceOddRow options are set to true (the default value is false).

For more information on appearances, see the Appearances topic.

#Example

The following code shows how to use the EvenRow and OddRow properties to customize the appearance of even and odd rows in the TreeList. Note that these properties are in effect if the EnableAppearanceEvenRow and EnableAppearanceOddRow options are enabled.

image

treeList1.Appearance.EvenRow.BackColor = Color.PaleVioletRed;
treeList1.Appearance.OddRow.BackColor = Color.LightPink;
treeList1.OptionsView.EnableAppearanceEvenRow = true;
treeList1.OptionsView.EnableAppearanceOddRow = true;
See Also