Categories > Coding > C# >

(Help) Search Treeview

Illusion

IllusionOfficial

Posts: 71

Threads: 7

Joined: Sep, 2021

Reputation: -40

Posted

```var View = CollectionViewSource.GetDefaultView(treeview.Items);

            if (View != null) View.Filter = (O) => { return O.ToString().ToLower().Contains(SearchBox.Text.ToLower()); };```

Im trying to get it to search the treeview but it wont work.

  • 1

Posts: 2086

Threads: 10

Joined: Sep, 2020

Reputation: 59

Replied

That code is yikes

  • 0

Discord : Doctor Doom#0550

Pluto

Pluto Development

Posts: 3

Threads: 0

Joined: Feb, 2022

Reputation: 0

Replied

yeah ofc it wont work that code is for a listbox

  • 0

Posts: 867

Threads: 34

Joined: Aug, 2020

Reputation: 6

Replied

ever heard of a recursive searching method lol

  • 0

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )