PreSelected treeview item

Hi. I'm using treeview component and it's working perfectly, but I need a way to have a default item selected and all it's parents to be expaded when user landing on page .
Here's my code:

<RadzenTree Expand=@LoadFiles Change=@OnChange Data=@coreDocuments Style="width: 100%; height: 75vh">
            <RadzenTreeLevel TextProperty="DocumentName" ChildrenProperty="Children" Template=@FileOrFolderTemplate HasChildren=@(e => (e as DocumentNode).IsFile == false ) />

Sorry but I have another question: There is a way to search through RadzeTree items?
Thank you!

You can search for other threads in the forum that show how to use the Selected property of the TreeLevel to specify what node is selected.

Searching in the tree items is not supported.

1 Like