Skip to main content

DxTreeView.UrlMatchMode Property

Specifies whether the TreeView can automatically expand to the node and select it if the DxTreeViewNode.NavigateUrl property value points to the active web page.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(NavigationUrlMatchMode.CurrentPath)]
[Parameter]
public NavigationUrlMatchMode UrlMatchMode { get; set; }

Property Value

Type Default Description
NavigationUrlMatchMode CurrentPath

An NavigationUrlMatchMode enumeration value.

Available values:

Name Description
None

Automatic selection synchronization is disabled.

CurrentPath

The component selects an item if the item’s NavigateUrl property value matches the current browser URL. The query string appended to the URL is ignored.

Prefix

The component selects an item if the item’s NavigateUrl property value starts with the current browser URL and vice versa.

Exact

The component selects an item if the item’s NavigateUrl property value matches the current browser URL.

Remarks

The item becomes selected if its DxTreeViewNode.NavigateUrl property value matches the active web page. If the control does select the item, it expands all parent items. Set the AllowSelectNodes property value to true to enable this functionality.

The following example disables URL synchronization:

<DxTreeView AllowSelectNodes="true" UrlMatchMode="NavigationUrlMatchMode.None">
    <Nodes>
        <DxTreeViewNode NavigateUrl="./" Text="Overview"></DxTreeViewNode>
        <DxTreeViewNode NavigateUrl="grid" Text="Grid"></DxTreeViewNode>
    </Nodes>
</DxTreeView>

Disable URL synchronization

See Also