Questions tagged [hierarchicaldatatemplate]

A `HierarchicalDataTemplate` is a subclass of `DataTemplate` that allows you to bind directly to a hierarchy of objects

A HierarchicalDataTemplate is a subclass of DataTemplate that allows you to bind directly to a hierarchy of objects. This provides a powerful means to bind a hierchy of objects to wpf controls that deal with such data, such as TreeViews and Menus.

305 questions
0
votes
1 answer

sorting hierarchical datas in Asp.Net

My database structure is: Table Name: Category Columns: CategoryID | CategoryName | ParentID I want to list all categories by their children and their childrens' children also. I'm using WITH for finding all levels in MS SQL, but how can I show…
0
votes
0 answers

Specifics regarding how HierarchicalDataTemplate works

What logic does HierarchicalDataTemplate use to create a new branch? By this I mean "what available properties of the items in the ItemsSource does HierarchicalDataTemplate use to know it needs to make a new branch." --UPDATE-- I was being caught…
Rachael
  • 1,965
  • 4
  • 29
  • 55
0
votes
1 answer

Disable treeview root node when using hierarchicaldatatemplate

im using WPF/MVVM to fool around with a treeview control
Swift
  • 166
  • 2
  • 16
0
votes
1 answer

Creating menuitems from list with bindings results in blank items

I have a Menuitem which is supposed to show a list of quantities as children which show a list of the units defined for this quantity as children. The list of quantities is set in code-behind to the ItemsSource of the MenuItem.
JCH2k
  • 3,361
  • 32
  • 25
0
votes
2 answers

Cannot get Silverlight HierarchicalDataTemplate to display IsolatedStorage folders

This is my first foray into Hierarchical data and am having a bit of a problem. In Silverlight 4, I am trying to get a list of isolated storage folders to display in a TreeView. Nothing displays at all. My Treeview is completely blank. What am I…
0
votes
0 answers

Displaying hierarchial structure - missing/invalid datacontext

I'm trying to display this hierarchial structure: public interface IProgressIndicator { CancellationToken CancellationToken { get; } string Name { get; set; } } public interface IPercentageProgressIndicator : IProgressIndicator { int…
mnn
  • 1,952
  • 4
  • 28
  • 51
0
votes
1 answer

TreeView with MasterDetails and ToggleButton

I want to create a TreeView with MasterDetails on selected Item. The problem is, that no children are displayed in my SelectedItem, even when the parent is expanded. Somehow the HierarchicalDataTemplate seems to get lost. Maybe I am just wrong with…
Mare Infinitus
  • 8,024
  • 8
  • 64
  • 113
0
votes
1 answer

Set Color for individual Treeview items based on data not bound to the treeview WPF

I am trying to figure out the best way to approach this. I have a treeview that is using Hierarchal data from sql server tables. Using linq to generate the dbml and then binding the data to the treeview. Here is the part I am having trouble with.…
LionsFan
  • 35
  • 4
0
votes
4 answers

HierarchicalDataTemplate: first level of children only

I have a tree view of items, which currently shows all the levels of children, down to the furthest. How can I achieve to show only the first level of children? Is the HierarchicalDataTemplate the wrong approach, perhaps? Collapsing the children of…
Michael Schnerring
  • 3,584
  • 4
  • 23
  • 53
0
votes
2 answers

Silverlight - TreeView and HierarchialDataTemplate

forgive my English is not good, and I hope to explain well. I can not see the child nodes in Treview (SL4). I have this situation: 2 classes: Public Class My_Root Private My_Cod_Prod As String Public Property Cod_Prod() As String …
0
votes
1 answer

C# WPF How do I get a TreeViewItem from HierarchicalDataTemplate item?

I have the same problem as a previous question on this forum: previous thread I have a TreeView which uses a HierarchicalDataTemplate to bind its data. I need to get the TreeViewItem from the selected item, which is my own class. I have tried the…
user175396
0
votes
1 answer

How to get the logical tree item that contains data-templated object

I have an object called "TextModel". I defined a HierarchicalDataTemplate for it. like this:
0
votes
3 answers

HierarchicalDataTemplate not working

I am trying to use a HierarchicalDataTemplate to recursively create expanders with items in them but when I use the HierarchicalDataTemplate I only get the first level of items displayed. Please let me know if you need anyore information. Heres the…
user589195
  • 4,180
  • 13
  • 53
  • 81
0
votes
1 answer

Hierarchical Data Template of an object with a property as List

I have an object with this structure public class Parent { public string Name {get; set;} public int ID {get; set;} public List Children{set; get;} public Address HomeAddress {get; set;} } I created a hierarchical template for…
Akanksha Gaur
  • 2,636
  • 3
  • 26
  • 50
0
votes
2 answers

StackoverflowException when binding HierarchicalDataTemplate

I want to use the HierarchicalDataTemplate with a TreeView control in WPF. I created a viewmodel class but a System.StackOverflowException occurs every time the program starts. I have no idea why this happens. Here is the WPF markup:
Gerrit Horeis
  • 541
  • 5
  • 14