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

TreeList.SetDefaultRowHeight() Method

In This Article

Activates automatic row height adjustment.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

public virtual void SetDefaultRowHeight()

#Remarks

The height of rows is specified by the TreeList.RowHeight property. If this property value is -1, row height is determined by the Tree List control automatically. In this case, rows get the minimum height required to fit row contents vertically. This implies that the following row elements must fully display their contents: cells, state and select images, group button. Note that the TreeList.RowHeight property doesn’t affect the height of preview sections.

There may be a situation when different rows have different minimum required heights. This can take place, for instance, if you apply different font sizes to odd and even rows. In this case, rows still get the same height which is enough to fit the highest row contents.

The SetDefaultRowHeight method sets the TreeList.RowHeight property to -1 and, thus, applies the automatic row height adjustment to Tree List rows.

Note: users can apply automatic row height adjustment by a double-click on an indicator cell edge.

See Also