Skip to content

How to select all TreeView? #10209

Answered by castorix
lostluna1 asked this question in Q&A
Dec 2, 2024 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

When I do this in a test TreeView (tv1), it selects all items :

            tv1.SelectedItems.Clear();
            foreach (var rootNode in tv1.RootNodes)
            {
                tv1.SelectedItems.Add(rootNode);
            }

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@ghost1372
Comment options

@lostluna1
Comment options

@lostluna1
Comment options

Comment options

You must be logged in to vote
1 reply
@lostluna1
Comment options

Answer selected by lostluna1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants