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

BeforeFocusNodeEventArgs.CanFocus Property

Gets or sets a value indicating whether focus is allowed to be moved.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

#Declaration

public bool CanFocus { get; set; }

#Property Value

Type Description
Boolean

true if the focus is allowed to be moved; otherwise false.

#Remarks

Use the CanFocus property to prohibit moving focus to particular nodes. Set this property to false for this purpose. The node to which focus is being moved can be identified via the NodeEventArgs.Node property.

Note: if a user double-clicks a parent node which cannot be focused (as a result of handling the TreeList.BeforeFocusNode event, in particular), nodes are expanded and or collapsed.

See Also