treeview

Create a solution explorer like Visual Studio

I want to be able to create a tree view that can get its nodes form a directory on a computer. In the code below, I am able to get all of the files into a list, but I cannot get the folder correct. What I mean is in your user directory, you have sub directorys such as, Documents, Music, and Pictures. When you run this code, it displays t...

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 based on the items level. I have an unsorted ArrayList of objects that have an ID and p...

Keyboard Navigation is not working.

I have created a TreeViewComboBox control, in this I am having a ComboBox with items as TreeView, but Keyboard Navigation doesn't work on the TreeView. I am not able to navigate through the TreeViewItems using keyboard. Any help plz? ...

The best way to represent a tree structure on iPad

I am developing an iPad application and I need to represent tree structure (a simple tree structure which has root, parent and child nodes) on iPad. Is there a final solution for such kind situations, like TreeView? ...

ASP.Net - How to access masterpage Object from regular page?

In a project I'm working on, the master page codebehind does a load of complex checks and confirmations that decide the navigation list displayed on the TreeView of the page. Now, I need a way to access this list from another front-end page, such as "frontpage.aspx". This serves two purposes. One, the masterpage will hide pages on the n...

Check or uncheck all TreeViewItem children

My project is WinForms, C#. I have a form with TreeView with CheckBoxes set to true. There are a few root nodes each having multiple children nodes. I'd like to have all children nodes to have the same checked/unchecked state as their parent. I wrote the following event handler: private void treeView1_AfterCheck(object sender, TreeVie...

Expand a treeViewItem Automatically

Hello I have a TreeView that I filled with a list of TreeViewItem from a collection (using the binding), I linked to a TreeView event "Expand" to expand it and display their childrens, my objective now is to get the last TreeViewItem accessed and to initialize the TreeView by the last treeViewItem consulted. I can retrieve the last Tree...

MFC CTreeCtrl node (a ComboBox in this case) does not seem to lose focus in Windows 7

My application uses MFC CTreeCtrl. One of the nodes of the tree has a ComboBox control of DropDownList style. In Windows 7, if we were to select an option from the ComboBox dropdown and then click on another node of the tree, the new node gets highlighted but the focus remains with the CComboBox control! I don't see this behavior on Win...

Catching an Exception across treeview.Nodes.Add / treeview_AfterSelect event boundary

There is a place in my WinForms program that throws a MyOwnException. void CodeThatThrowsMyOwnException() { ... throw new MyOwnException("Deep Inside"); ... } Further up the stack, there is a simple try/catch block try { CodeThatThrowsMyOwnException(); } catch (MyOwnException moe) { MessageBox.Show("Hit this point...

Changing TreeNode.BackColor causes full TreeView redraw

I set the BackColor of specific TreeNodes in a TreeView as a hint to the user that something interesting has happened to the node while they are using the application. However, when I set BackColor, it causes the entire parent TreeView control to redraw rather than just the label area of the specific TreeNode that has been changed. I a...

Silverlight treeview. Cannot bind "IsExpanded" property

I have treeview control and i want bind tree nodes IsExpanded property to my datasource items! But i have exception: System.Windows.Markup.XamlParseException occurred Message=Set property '' threw an exception. StackTrace: at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at Silverlig...

C#: How to programmatically scroll TreeView control?

Have a good day, Please advice how can I scroll a .NET TreeView Control programmatically. It doesn't implemented any public methods to scrolling. Thanks in advance. -- Murat ...

How to get value from checked parent and child nodes if have using treeview with PopulateOnDemand properties

Hi to all, My problem is, i am using asp.net treeview with check boxes and to reduce the loading i am using populateondemand method, It is loading no problem but When i am selecting any Parent node check box it is showing the checked status false. Even Its child nodes checked status also showing false if checked any. So, pls. help to fi...

Getting the TreeViewItem on newly created items

There has to be a better way then the following for getting "childItem" TaskItem task = (sender as Canvas).DataContext as TaskItem; TaskItem child = Tasks.CreateTask("New task", task); TreeViewItem item = treeView.ItemContainerGenerator.ContainerFromItem(task) as TreeViewItem; item.UpdateLayout(); TreeVi...

Drag starting on a click for TreeViewDragDropTarget in Silverlight

I'm using the TreeViewDragDropTarget control in Silverlight and the drag operation is starting on a click rather than a drag. I don't want the operation to start on a click, only on a drag. How do I prevent this? ...

Windows 7 not firing WM_SETFOCUS when switching nodes within a tree control

My application has a tree of type CTreeCtrl. One of the nodes of the tree is CComboBox control created as a child of this tree structure. c_combo->Create( WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_HASSTRINGS | CBS_DROPDOWNLIST, myrect, m_pTree, IDD_OBTC_COMBO ); In essence, the ComboBox gets created when clicked on the tree node and we...

How to hide the tool tips

Hi all, I am having a treeview with some nodes. I am also having a panel. I have taken some usercontrol forms and i will load those usercontrols when corresponding node is selected from the child hood. Now what i need is have some validations like if i left the text box empty i will have some tooltips displayed to the user. Su...

How do I make a Control follow its parent in a scrolling TreeView?

I've got a TreeView with a bunch of child nodes in it, all of which have child nodes of their own. A user asked me to provide auto-completion when editing any of the "grandchild" TreeNodes, so I had to implement a floating TextBox that sits directly over the TreeNode. Problem is, if the user scrolls the TreeView with her middle mouse b...

Remove link from treeview parent node

Hi, Is there a way I can keep the text of a Parent node but remove the link? The treeview parent node is used just as a header, no navigation.Any help would be great.Thanks. private void BindNodes(string PtID) { if (PtID != "") { int PatientID = Convert.ToInt32(PtID); DBCo...

Handle Database Transactions & Exceptions in TreeView with Multi-Tier MVVM

Hello: Background: I have a custom user control based around a WPF TreeView. I've been using the MVVM pattern and have a base view model TreeNode class and several derived view models such as LocationNode, LocationFolder, PersonNode, PersonFolder, CollectionNode, CollectionFolder, etc.. A example of how the tree might be laid out is: ...