Questions tagged [treeview]

TreeView control is used to display hierarchical information.

A tree view (control) displays a hierarchy of nodes, where the user can expand and collapse these nodes while navigating through the control. Often a tree view will provide the user the ability to view or edit additional information relating to the node selected.

Tree views are often used to present hierarchical data, such as an XML document or files and folders structure.

9439 questions
43
votes
4 answers

Why isn't there a SelectedNodeChanged event for Windows.Forms.TreeView?

The System.Web.UI.WebControls.TreeView class offers this event, but the Forms version of TreeView doesn't. What's the equivalent in the Forms world? I'm using AfterSelect but it doesn't seem quite right. Maybe it is in fact what I'm looking for but…
I. J. Kennedy
  • 24,725
  • 16
  • 62
  • 87
42
votes
11 answers

Android Treeview

I know there is the ExpandableListView but it only supports up to 2 levels. I need a true treeview vertical list with at least up to ~5 levels (more is better). Any suggestions? edit: I see talk about using a Custom Adapter and setting the padding…
Daniel Sloof
  • 12,568
  • 14
  • 72
  • 106
40
votes
6 answers

WPF MVVM TreeView SelectedItem

This cannot be this difficult. The TreeView in WPF doesn't allow you to set the SelectedItem, saying that the property is ReadOnly. I have the TreeView populating, even updating when it's databound collection changes. I just need to know what item…
Kyeotic
  • 19,697
  • 10
  • 71
  • 128
40
votes
1 answer

WPF Treeview Databinding Hierarchal Data with mixed types

I have a bit of a complex situation with WPF Treeview Binding. I have spent the last 2 days trying Google it, and this is the closed I came up with, but it doesn't solve the issue. Here is the situation: I have an object that looks like…
thorkia
  • 1,972
  • 1
  • 20
  • 26
40
votes
4 answers

How to clear an entire Treeview with Tkinter

My program uses a ttk.Treeview as a table and fills it with many numbers. I want to clear the ttk.Treeview when I press a button in the window. Is there a simple way to clear the ttk.Treeview? Thanks.
katze
  • 1,273
  • 3
  • 16
  • 24
36
votes
12 answers

How to get TreeViewItem from HierarchicalDataTemplate item?

I have a TreeView which uses a HierarchicalDataTemplate to bind its data. It looks like this:
Razzie
  • 30,834
  • 11
  • 63
  • 78
36
votes
4 answers

JQuery Checkbox Treeview

I am looking for a JQuery Checkbox Treeview. Does anyone know if a good one exists?
Billy Logan
  • 2,833
  • 16
  • 43
  • 49
34
votes
1 answer

Populate TreeView with file system directory structure

i am new with Nodes here.. :) i came up with this algorithm but it only shows the list of parent nodes.. like this.. a a.txt b c c m n b o p etc... i want the next node will be put in one of the node inside the previous node..…
Vincent Dagpin
  • 3,581
  • 13
  • 55
  • 85
34
votes
4 answers

TreeView with columns

I need a multi columned Treeview for an app I am writing, I was wondering if anyone knew of a free working (in Vs-2010) multi columned Treeview.
Vade
  • 2,009
  • 6
  • 24
  • 32
34
votes
6 answers

How to select a node of treeview programmatically in c#?

Used treeview.SelectedNode to select a child node. How to invoke treeview.AfterSelect event when a node is selected programmatically? this.treeView1.SelectedNode = this.treeView1.Nodes[0].Nodes[0].Nodes[0].Nodes[0]; if…
user186246
  • 1,857
  • 9
  • 29
  • 45
34
votes
5 answers

Scrolling in virtualized WPF TreeView is very unstable

If virtualizing is enabled in TreeView with items having various sizes, multiple problems appear: Vertical scroll bar changes its size randomly and doesn't remember sizes of elements after viewing the whole tree. Scrolling with mouse is hard. After…
Athari
  • 33,702
  • 16
  • 105
  • 146
34
votes
6 answers

C# WinForms highlight treenode when treeview doesn't have focus

I'm making an interface to edit scenarios for a game. Basically it consists of events, which have nested conditions and actions. So, I planned on using two treeviews - one for selecting the event, and other for selecting the condition/action inside…
Istrebitel
  • 2,963
  • 6
  • 34
  • 49
33
votes
8 answers

TreeNode Selected BackColor while TreeView not focused

Is there an easy way to have a selected TreeNode retain its SystemColors.Highlight BackColor while the TreeView doesn't have focus? Because even with HideSelection set to false, the selected BackColor is near impossible to see. Selected TreeNode…
Spark
  • 1,007
  • 1
  • 8
  • 26
31
votes
1 answer

How to get Windows native look for the .NET TreeView?

When using the TreeView component in .NET, I get the look of the left tree. How can I get the look of the right tree (Windows Native Look) for my .NET TreeView? What I especially want to get is the "triangle" node handles and the blue "bubble"…
user356178
31
votes
3 answers

Right click select on .Net TreeNode

I am trying to show a popup menu on my treeview when users right click - allowing them to choose context sensitive actions to apply against the selected node. At the moment the user has to left click node and then right click to choose. Is it…
Martin
  • 39,569
  • 20
  • 99
  • 130