Skip to main content
A newer version of this page is available. .
Tab

ASPxTreeView.SyncSelectionMode Property

Gets or sets whether the node whose navigation location points to the currently browsed web page is automatically selected.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue(SyncSelectionMode.CurrentPathAndQuery)]
public SyncSelectionMode SyncSelectionMode { get; set; }

Property Value

Type Default Description
SyncSelectionMode **CurrentPathAndQuery**

A SyncSelectionMode enumeration value that specifies whether automatic synchronization of node selection with the path of the currently browsed page is enabled.

Available values:

Name Description
None

Automatic selection synchronization is disabled.

CurrentPathAndQuery

A web control’s item, whose NavigateUrl property’s value matches the URL and query string of the currently browsed page, is displayed selected.

CurrentPath

A web control’s item, whose NavigateUrl property’s value points to the URL of the currently browsed page, is displayed selected. The query string appended to the URL is ignored.

Remarks

The ASPxTreeView supports automatic synchronization of node selection with the path of the currently browsed page. You can choose synchronization mode by specifying the SyncSelectionMode property value.

The table below lists the available property values with their descriptions:

 

Value Description
CurrentPath The node whose TreeViewNode.NavigateUrl property value points to the URL of the currently browsed page, is displayed selected. In this case, the query string appended to the URL is ignored.
CurrentPathAndQuery The node is automatically selected if its TreeViewNode.NavigateUrl property value matches the URL and query string of the page which is currently being browsed.
None Automatic selection synchronization is disabled.

 

Note

Automatic selection synchronization is enabled if the ASPxTreeView.AllowSelectNode property is set to true.

Note

The SyncSelectionMode property affects the ASPxTreeView control behavior in virtual mode.

In virtual mode, the ASPxTreeView.VirtualModeCreateChildren event fires when expanding a node for the first time.

See Also