treeview

Making a specific node expand based on the navigate URLs of its children

So I have a TreeView and it has about 7 parent nodes that have 3-5 children each. All of these children nodes when click navigate to a URL. What I would like to do is have one parent node auto-expand based on the URL and the other parent nodes to collapse. If that wasn't clear, here is an example: Root | |--Admin | | | |--Add.as...

TreeView Population Via Database Question

I want to populate the treeview strucure in windows application using C# and I have a table structure in database: table1 folder | -->folderid | -->foldername table2 file | -->fileid | -->filename table3 fillfolder | -->id | -->folderid | -->fileid That file is always the child of the folder, but how I can populate the...

WPF Treeview ShowRootlines

Hi, Is there a way to show Root lines in a WPF Treeview? Or do you have to resort to doing something complicated like using Control Templates The Winforms treeview has a ShowRootLines property but none exists for the WPF treeview. Thanks ...

Highlight TextBlock only in TreeViewItem with Image

So I have a TreeViewItem that has the following style: <Style TargetType="{x:Type TreeViewItem}"> <Setter Property="HeaderTemplate"> <Setter.Value> <DataTemplate> <StackPanel Orientation="Horizontal"...

'Collapse all' problem with jQuery Treeview plugin

And the problem is that after I click on the 'Collapse all' link, 'some' of the pluses and minuses are displayed opposite to what they should be: i.e. an 'expandable' node would be shown with a minus next to it. Apart from that, the tree works correctly. (Well, the 'expand all' functionality is affected, as well but I think this is part ...

Whilst using drag and drop, can I cause a Treeview to Expand the node over which the user hovers?

In brief: Is there any built-in function in .Net 2.0 to Expand TreeNodes when hovered over whilst a Drag and drop operation is in progress? I'm using C# in Visual Studio 2005. In more detail: I've populated a Treeview control with a multi levelled, multinoded tree (think organisational chart or file/folder dialog) and I want to us...

How to load TreeView Serialization into GridView

From a TreeView, I get this XML serialized: <?xml version="1.0" encoding="utf-16"?><node text="&lt;span id='c6f5ab9e-d08f-448a-9143-02d174317c07' oncontextmenu=&quot;SetContextMenu(this.id, event);return false;&quot; &gt;Zürich&lt;/span&gt;" value="c6f5ab9e-d08f-448a-9143-02d174317c07" navigateurl="" populateondemand="False" showcheckbo...

WPF DataBound treeview expand / collapse

Hello, I'm just trying to find a way to control the expand / collapse of the treeview nodes through the object they're bound to. The object has an IsExpanded property, and I want to use that to show the treeview node itself expanded or collapsed based on that property. Here's my code: C# public partial class Window2 : Window {...

Lightweight jQuery tree controller?

I need a simple jQuery folder tree controller with the following features: to be based on a nested unordered list expand/collapse drag and drop to reorder ajax support (not sure if I need this) Which is the tree controller you think is the most appropriate for this? Thank you in advance for your time, titel ...

Hierarchical data and ASP.NET treeview implementation

I am generating following kind of data from Oracle (using its Hierarchical data query feature). Level Category 1 ABC 2 XYZ 3 HJK 3 IKJ 3 OLK 3 FGH 2 ASV 3 IKL 3 LOK 3 TYR 3 ERO 2 QWE 3 OPR Rules of Game: From Top to bottom:each lower level category is parent of of its next level category. From bottom to to...

Making YUI TreeView only expand/collapse using the + / - icons

Hello, The problem I am having is that the default YUI TreeView behavior of expanding/collapsing nodes when a user clicks on them is getting in the way of some custom UI functionality I am implementing. I have been able to reduce this to some degree by subscribing to the "clickEvent" and returning false; however the problem still prese...

Silverlight: How to change TreeViewItem text color when it selected

I have TextBlock inside HierarchicalDataTemplate. I need to set foreground color to Red when TreeViewItem selected. <controls:TreeView Background="#FF939597" ScrollViewer.HorizontalScrollBarVisibility="Disabled" x:Name="CommentTreeView" Margin="0,0,0,118" ItemContainerStyle="{StaticResource SectionsTreeViewItemStyle}"...

LINQ to SQL as databinding source for WPF Treeview

I wonder if someone could provide a simple example of the following. (preferably in VB.Net): I have an SQL database with related tables and I am successfully using LINQ to SQL in other areas of my application, but am a little stuck with the Heirarchical Treeview. I would simply like to use a LINQ query from the database as a source fo...

WPF: TreeView and nested templates

I'm trying to display a class using a treeview but nothing is displayed. I've inspected the container with Snoop and I see the StackPanel, but it's empty, even the the project does have a title and pages. There are no binding errors and I have no idea why it's not working. public class Project : INotifyPropertyChanged { public s...

Why does the hover style not work on the leaf nodes of jQuery Treeview?

If you look at Sample 1 on this page, you will see that, when you hover over the folder entries, the text turns red, but not if you hover over the leaf entries. I would like the styling for the leaf entries to work the same way as the folder entries. Each branch of the tree is an unordered list. The leaf entries are list items <li>. ...

TTreeview Icon Weirdness

I'm setting image indexes like this: with TN do begin ImageIndex := 1; SelectedIndex := 1; end; Problem: I use the same code for three icons in various places through my main unit (when I'm adding nodes). I set the icon with the same approach each time. The first icon (which happens to be on a parent node), displays correctly. The s...

Parent window goes null on Clicking TreeView child to Popup a window [ASP.NET]

In my webpage I have a treeview with some items. When I clicking on a node I needs to open a Popup window and it is working fine. But the Parent window that contains the treeview goes to null. Why this happen so? ...

ASP.NET MVC with tree - pattern

Hello, I am preparing a skeleton of ASP.NET MVC application with basic CRUD functions on Products and Parts included in these products. Application contains couple of strongly-typed views based on the MasterPage and now I want to add a widget to display the menu tree. This menu tree is going to reflect the Products/Parts structure so it ...

C# winforms TreeNode mouse hover tooltip problem

I am trying to show a tooltip when mouse hovers on a treeview node. But the tooltip is not showing up. This is my code: private void treeView1_MouseHover(object sender, EventArgs e) { toolTip1.RemoveAll(); TreeNode selNode = (TreeNode)treeView1.GetNodeAt(Cursor.Position); if (selNode != null) { if (selNode.Tag !=...

Update property on view model without code behind?

I'm using a TreeView inside a Combobox control (from here). I have a ViewModel object that is the DataContext of my window. What I would like to have happen is when the selected item in the treeview/combobox changes I want a property on my ViewModel to be updated with that selected item. Ideally I'd like to be able to do this completely...