Search Results

Search found 536 results on 22 pages for 'treeview'.

Page 1/22 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • jquery treeview global saving position

    - by kusanagi
    i use such treeview http://docs.jquery.com/Plugins/Treeview/treeview, it saves perfect opened nodes when i click to subnodes links, but if i click on link, that is not in treeview the treeview is closes. for example- in treeview i have product categories, when click on category it loads list of products, but if i click on product details (this link not in treeview) then treeview is close. any ideas?

    Read the article

  • WPF, TreeView bug, can't select root item after item removed from treeview

    - by user275587
    I have a very weird bug in a three level deep TreeView. It is intermittent and I can't find how to reproduce it consistently. After programmatically removing, adding then removing some third level items, when I click on the root item it isn't selected. It can still expand/collapse but can't be selected with a mouse click and it doesn't fire ItemSelectionChange event. You can click to select a second level or third level items and after that you're finally able to select the root item. I've tried to set IsSelected = false for all items after removing and tried to do a nice clean-up when removing items but it doesn't help. Did anybody run into that bug? Do you have any suggestions to remove this bug?

    Read the article

  • How to obtain the panel within a treeview (WPF)

    - by sperling
    How can one obtain the panel that is used within a TreeView? I've read that by default TreeView uses a VirtualizingStackPanel for this. When I look at a TreeView template, all I see is <ItemsPresenter />, which seems to hide the details of what panel is used. Possible solutions: 1) On the treeview instance ("tv"), from code, do this: tv.ItemsPanel. The problem is, this does not return a panel, but an ItemsPanelTemplate ("gets or sets the template that defines the panel that controls the layout of the items"). 2) Make a TreeView template that explicitly replaces <ItemsPresenter /> with your own ItemsControl.ItemsPanel. I am providing a special template anyways, so this is fine in my scenario. Then give a part name to the panel that you place within that template, and from code you can obtain that part (i.e. the panel). The problem with this? see below. (I am using a control named VirtualTreeView which is derived from TreeView, as is seen below): , use following: -- [sorry folks about poor formatting here, this is my first post, I tried 4 spaces for code... doesn't seem to work?] [I stripped out all clutter here for visibility...] The problem with this is: this immediately overrides any TreeView layout mechanism. Actually, you just get a blank screen, even when you have TreeViewItems filling the tree. Well, the reason I want to get a hold of the panel is to take some part in the MeaureOverride, but without going into all of that, I certainly do not want to rewrite the book of how to layout a treeview. I.e., doing this the step #2 way seems to invalidate the point of even using a TreeView in the first place. Sorry if there is some confusion here, thanks for any help you can offer.

    Read the article

  • Strange Behaviour WPF TreeView ItemContainerStyle and ItemTemplate

    - by Matze
    I just noticed some strange behaviour of WPF's TreeView. I added both ItemContainerStyle to bind to "IsSelected" of my ViewModel and an ItemsTemplated for custom display of my data. But now the user cannot change the selected node anymore. For testing purposes I created a similar UI using ListView and Expander. This version works as excepted. Any tips why TreeView does fail? <TreeView ItemsSource="{Binding ElementName=frame, Path=list}"> <TreeView.ItemContainerStyle> <Style TargetType="{x:Type TreeViewItem}" > <Setter Property="IsSelected" Value="{Binding Mode=TwoWay, Path=IsSelected}"/> </Style> </TreeView.ItemContainerStyle> <TreeView.ItemTemplate> <HierarchicalDataTemplate> <TreeViewItem Header="{Binding}"> <TextBlock Text="{Binding Path= Item.SomeData}"/> </TreeViewItem> </HierarchicalDataTemplate> </TreeView.ItemTemplate> </TreeView>

    Read the article

  • Silverlight recursivly bind Treeview to XDocument

    - by Michael Wagner
    How can I recursivly bind a Treeview to an XDocument, mapping each XML Element to a Node in the Treeview? The code below should work from my perspective (and also according to the very few posts I found regarding direct binding), however it does not: <sdk:TreeView ItemsSource="{Binding Path=Elements}" DataContext="{Binding Path=Data}"> <sdk:TreeView.ItemTemplate> <data:HierarchicalDataTemplate ItemsSource="{Binding Path=Elements}"> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding Name}"/> </StackPanel> </data:HierarchicalDataTemplate> </sdk:TreeView.ItemTemplate> </sdk:Treeview> (Data is a Property of type XElement on the parents' DataContext) Did I make a mistake somewhere or do I really need to implement an IValueConverter just to get at the child elements of an XElement?

    Read the article

  • Populating Tcl Treeview with Sqlite Data

    - by DFM
    Hello: I am building a Tcl application that reads off of a Sqlite Db. Currently, I can enter data into the database using the Tcl frontend. Now, I am trying to figure out how to display the data within the Sqlite Db from the Tcl frontend. After a little bit of research, I found that the treeview widget would work well for my needs. I now have the following code: set z1 [ttk::treeview .c1.t1 -columns {1 2} -show headings] $z1 heading #1 -text "First Name" $z1 heading #2 -text "Last Name" proc Srch {} {global z1 sqlite3 db test.db pack $z1 db close } When the "Srch" procedure is executed (button event), the treeview (z1) appears with the headings First Name and Last Name. Additionally, the Sqlite Db gets connected, then closes. I wanted to add code that would populate the treeview from the Sqlite Db between connecting to the Db and packing the treeview (z1). Does anyone know the correct syntax to populate a Tcl treeview with data from Sqlite? Thank you everyone in advance, DFM

    Read the article

  • Setting treeview background color in VB6 has a flaw - help?

    - by RenMan
    I have successfully implemented this method of using the Win32 API to set the background color of a treeview in VB 6: http://support.microsoft.com/kb/178491 However, one thing goes wrong: when you expand the tree nodes more than two levels deep, the area to the left of (and sometimes under) the inner plus [+] and minus [-] signs is still white. Does anyone know how to get this area to the correct background color, too? Note: I'm also setting the BackColor of each node, and also the BackColor of the treeview's imagelist. Here's my version of the code: Public Sub TreeView_SetBackgroundColor(TreeView As MSComctlLib.TreeView, BackgroundColor As Long) Dim lStyle As Long, Node As MSComctlLib.Node For Each Node In TreeView.Nodes Node.BackColor = BackgroundColor Next TreeView.ImageList.BackColor = BackgroundColor Call SendMessage( _ TreeView.hwnd, _ TVM_SETBKCOLOR, _ 0, _ ByVal BackgroundColor) 'Now reset the style so that the tree lines appear properly. lStyle = GetWindowLong(TreeView.hwnd, GWL_STYLE) Call SetWindowLong(TreeView.hwnd, GWL_STYLE, lStyle - TVS_HASLINES) Call SetWindowLong(TreeView.hwnd, GWL_STYLE, lStyle) End Sub

    Read the article

  • Binding to TreeView in WPF

    - by KrisTrip
    I am trying to bind some data from a class instance to a TreeView. My code is as follows: public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); Parent myClass = new Parent(); this.DataContext = myClass; } } public class Parent { public String Name; public List<string> Children = new List<string>(); private static int count = 0; public Parent() { this.Name = "Test"; for (int i = 0; i < 10; i++) { Children.Add(i.ToString()); } } } And the XAML: <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:loc="clr-namespace:WpfApplication1" Title="MainWindow" Height="287" Width="525"> <StackPanel Orientation="Horizontal" VerticalAlignment="Stretch"> <TreeView Name="TreeView" ItemsSource="{Binding}"> <TreeView.ItemTemplate> <HierarchicalDataTemplate ItemsSource="{Binding Children}"> <TextBlock Text="{Binding Name}"/> </HierarchicalDataTemplate> </TreeView.ItemTemplate> </TreeView> </StackPanel> </Window> Nothing shows up in my TreeView. What am I doing wrong?

    Read the article

  • Get selected object from TreeView

    - by GoGoDo
    I've been working on a minor (first time) app with quickly and hit a hurdle - how do I get the selected row (the data) from a TreeView? The data to the TreeView is passed from a list of files in a directory, and I need to know which rows were selected (and thus which files were). What is the best way to do that? Here's the current code: self.treeview = self.builder.get_object("treeview") select = self.treeview.get_selection() select.connect("changed", self.on_tree_selection_changed) def on_tree_selection_changed(selection): model, treeiter = self.treeview.selection-get() if treeiter != None: print "You selected", model[treeiter][0]

    Read the article

  • Modelling a checkable treeview in the MVVM model

    - by Stephen Stranded
    Hi, I am trying to create a checkable treeview control to list hierarchical data but it does not seem to work. I used the MVVM model example used by in codeplex simplified Treeview using ViewModel but it shows nothing. Here is my code. Please help. I am a newbie to WPF and the MVVM model but i very much want to use it in an urgent application. </UserControl.Resources> <Grid> <StackPanel Height="166"> <TextBlock Text="Please Display this" /> <TreeView ItemsSource="{Binding Classifications}" Height="141"> <TreeView.ItemContainerStyle> <!-- This Style binds a TreeViewItem to a TreeViewItemViewModel. --> <Style TargetType="{x:Type TreeViewItem}"> <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> <Setter Property="FontWeight" Value="Normal" /> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="FontWeight" Value="Bold" /> </Trigger> </Style.Triggers> </Style> </TreeView.ItemContainerStyle> <TreeView.Resources> <HierarchicalDataTemplate DataType="{x:Type local:PropertyTypeViewModel}" ItemsSource="{Binding Children}"> <StackPanel Orientation="Horizontal"> <CheckBox Focusable="false" IsChecked="{Binding isSelected}"></CheckBox> <TextBlock Text="{Binding Classification}" /> </StackPanel> </HierarchicalDataTemplate> <HierarchicalDataTemplate DataType="{x:Type local:PropertyViewModel}" ItemsSource="{Binding Children}" > <StackPanel Orientation="Horizontal"> <CheckBox Focusable="false" IsChecked="{Binding isSelected}"></CheckBox> <TextBlock Text="{Binding PropertyName}" /> </StackPanel> </HierarchicalDataTemplate> <DataTemplate DataType="{x:Type local:LeaseViewModel}"> <StackPanel Orientation="Horizontal"> <CheckBox Focusable="false" IsChecked="{Binding isSelected}"></CheckBox> <TextBlock Text="{Binding TenantName}" /> </StackPanel> </DataTemplate> </TreeView.Resources> </TreeView> </StackPanel> </Grid>

    Read the article

  • WPF treeview with rounded corners

    - by BrettRobi
    I have a treeview in a UI full of rounded corners, so I'd like the treeview to match. Is it possible in xaml to change the border of a treeview to have rounded corners? I've thought about hiding the border and putting the treeview inside a rounded rectangle, but this loses real-estate and seems in-elegant. Any ideas?

    Read the article

  • Automatically Sizing an ASP.NET Treeview Control

    - by Robert Harvey
    Is there a way to automatically resize a TreeView control so that when it is rendered (or re-rendered, if a node is expanded), the TreeView automatically resizes itself to match the overall height of the tree? The purpose of this is to eliminate the scroll bar that accompanies the TreeView, so that the treeview blends seamlessly into the background.

    Read the article

  • WPF TreeView: How to style selected items with rounded corners like in Explorer

    - by Helge Klein
    The selected item in a WPF TreeView has a dark blue background with "sharp" corners. That looks a bit dated today: I would like to change the background to look like in Explorer of Windows 7 (with/without focus): What I tried so far does not remove the original dark blue background but paints a rounded border on top of it so that you see the dark blue color at the edges and at the left side - ugly. Interestingly, when my version does not have the focus, it looks pretty OK: I would like to refrain from redefining the control template as shown here or here. I want to set the minimum required properties to make the selected item look like in Explorer. Alternative: I would also be happy to have the focused selected item look like mine does now when it does not have the focus. When losing the focus, the color should change from blue to grey. Here is my code: <TreeView x:Name="TreeView" ItemsSource="{Binding TopLevelNodes}" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling"> <TreeView.ItemContainerStyle> <Style TargetType="{x:Type TreeViewItem}"> <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="BorderBrush" Value="#FF7DA2CE" /> <Setter Property="Background" Value="#FFCCE2FC" /> </Trigger> </Style.Triggers> </Style> </TreeView.ItemContainerStyle> <TreeView.Resources> <HierarchicalDataTemplate DataType="{x:Type viewmodels:ObjectBaseViewModel}" ItemsSource="{Binding Children}"> <Border Name="ItemBorder" CornerRadius="2" Background="{Binding Background, RelativeSource={RelativeSource AncestorType=TreeViewItem}}" BorderBrush="{Binding BorderBrush, RelativeSource={RelativeSource AncestorType=TreeViewItem}}" BorderThickness="1"> <StackPanel Orientation="Horizontal" Margin="2"> <Image Name="icon" Source="/ExplorerTreeView/Images/folder.png"/> <TextBlock Text="{Binding Name}"/> </StackPanel> </Border> </HierarchicalDataTemplate> </TreeView.Resources> </TreeView>

    Read the article

  • JQuery treeview - add node(s) in middle of tree

    - by Chris
    Hi all, I'm just getting started with JQuery and the treeview plugin so this should be a relatively easy question: The example code for adding branches to the tree: var newnodes = $("<li><span class='folder'>New Sublist</span><ul>" + "<li><span class='file'>Item1</span></li>" + "<li><span class='file'>Item2</span></li></ul></li>").appendTo("#browser"); $("#browser").treeview({ add: branches }); Works fine for me, but adds the new branch at the end of the tree - instead what I want is to be able to select a specific node and add to that branch. I've managed to get the node being added by using the id of the particular node instead of the whole treeview in - appendTo("nodeID") However I can't get the tree to render correctly, either with: $("nodeID").treeview({ add: branches }); or $("browser").treeview({ add: branches }); or calling it on both without arguments. Cheers in advance

    Read the article

  • Can't check more than one RadioButton across multiple items in a Treeview

    - by Mike Johnston
    I’m using a TreeView control to present a list of Questions. Using the Prism.DataTemplateSelector, I'm loading a View (.xaml file) that represents a single Question into each node in the TreeView. In the View for that question is a ListBox containing RadioButtons (one for each item in a Picklist object that the ListBox is bound to). The radio buttons work as expected for the question, but when I check a RadioButton on another node/question in the TreeView, the check for the button in the Question I was editing before disappears. In other words, I'm only able to check one RadioButton in the whole list of Questions/Items bound to the containing TreeView. How do I group the RadioButtons in the ListBox to the scope of the single question instead of all the questions in the TreeView.

    Read the article

  • how to clone a treeview c# and save it to recover later

    - by voodoomsr
    hi all, i need to clone an entire treeview to implement Undo\Redo actions. i try in different ways but it appears that directly isn't possible. I mean copying the entire treeview, save that copy in a list. Then when the Undo action is requested decrement a specific counter of levels of undo and replace the actual treeview with the treeview that exist in the index positions of the list. if I do redo the same happens but lvls is incremented so i recover what come next. Every time that a modifications occurs in the treeview i need to save that copy and increment the lvl counter

    Read the article

  • Column Header for a WPF TreeView

    - by nareshbhatia
    I am using the WPF TreeView to display some hierarchical information. Each item in the TreeView consists of several attributes, so I am using a Grid within my HierarchicalDataTemplate to display these attributes: <HierarchicalDataTemplate x:Key="ArtistTemplate" ItemsSource="{Binding XPath=Title}" ItemTemplate="{StaticResource TitleTemplate}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition SharedSizeGroup="NameColumn" /> <ColumnDefinition SharedSizeGroup="GenreColumn" /> <ColumnDefinition SharedSizeGroup="BornColumn" /> <ColumnDefinition SharedSizeGroup="DiedColumn" /> </Grid.ColumnDefinitions> <TextBlock Grid.Column="0" Text="{Binding XPath=@Name}" /> <TextBlock Grid.Column="1" Text="{Binding XPath=@Genre}" /> <TextBlock Grid.Column="2" Text="{Binding XPath=@Born}" /> <TextBlock Grid.Column="3" Text="{Binding XPath=@Died}" /> </Grid> </HierarchicalDataTemplate> This displays as a nice TreeView with 4 columns - so far so good! The only additional thing I need is a header above the TreeView that displays column names. The header column widths should be synchronized with TreeViewItems and also the header styles should be customizable. What's the easiest way to do this? P.S. I found two solutions that came close: 1) A TreeListView here, but this requires me to implement a custom interface (ITreeModel) to my model. Also the approach in this solution is to start with a ListView and to implement a RowExpander manually. In my case, the TreeView is sufficiently close to what I need, so I am hoping that putting a header on it should be very simple. 2) A TreeListView here. This one indeed starts with a TreeView, but I can't figure out how to customize the header. I suspect that I have to customize the GridViewHeaderRowPresenter in the generic.xaml, but this element does not seem to have its own ControlTemplate.

    Read the article

  • Shift+Tab not working in TreeView control

    - by Christian
    I cannot get backwards navigation using Shift+Tab to work in a TreeView that contains TextBoxs, forward navigation using Tab works fine and jump from TextBox to TextBox inside the TreeView. Anytime Shift+Tab is used when one of the TextBoxes inside the TreeView, then the focus is move to the previous control outside the TreeView, instead of the previous control inside the TreeView. Also its only Shift+Tab navigation that are not working correctly, Ctrl+Shift+Tab work as expected and in the correct order. Any suggestions to what I'm doing wrong? Example code: <Window x:Class="TestTabTreeView.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <Style TargetType="TreeViewItem"> <Setter Property="KeyboardNavigation.TabNavigation" Value="Continue" /> </Style> </Window.Resources> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBox Text="First Line" Grid.Row="0" /> <TreeView Grid.Row="1" KeyboardNavigation.TabNavigation="Continue" IsTabStop="False"> <TreeViewItem IsExpanded="True"><TreeViewItem.Header><TextBox Text="Popular Words"/></TreeViewItem.Header> <TreeViewItem><TreeViewItem.Header><TextBox Text="Foo"/></TreeViewItem.Header></TreeViewItem> <TreeViewItem><TreeViewItem.Header><TextBox Text="Bar"/></TreeViewItem.Header></TreeViewItem> <TreeViewItem><TreeViewItem.Header><TextBox Text="Hello"/></TreeViewItem.Header></TreeViewItem> </TreeViewItem> <TreeViewItem IsExpanded="True"><TreeViewItem.Header><TextBox Text="Unpopular Words"/></TreeViewItem.Header> <TreeViewItem><TreeViewItem.Header><TextBox Text="Work"/></TreeViewItem.Header></TreeViewItem> <TreeViewItem><TreeViewItem.Header><TextBox Text="Duplication"/></TreeViewItem.Header></TreeViewItem> </TreeViewItem> </TreeView> <TextBox Text="Last Line" Grid.Row="2" /> </Grid>

    Read the article

  • WPF TreeView similar to Organizational chart with connecting lines

    - by Priya
    I have modified my treeview to look like an Org chart using the example shown in the Code Project website (Author Josh Smith). I need connecting lines in the treeview to make it look exact to org chart. I found references pointing to the below site http://wpfblog.info/2008/05/26/turning-a-treeview-into-an-org-chart-with-connectors/ But I am not able to view the content. Probably the webpage has been moved. Can anybody help?

    Read the article

  • Binding a TreeView with ContextMenu in Xaml

    - by Michael Stoll
    I'm pretty new to Xaml and need some advise. A TreeView should be bound to a hierarchical object structure. The TreeView should have a context menu, which is specific for each object type. I've tried the following: <TreeView> <TreeView.Resources> <DataTemplate x:Key="RoomTemplate"> <TreeViewItem Header="{Binding Name}"> <TreeViewItem.ContextMenu> <ContextMenu> <MenuItem Header="Open" /> <MenuItem Header="Remove" /> </ContextMenu> </TreeViewItem.ContextMenu> </TreeViewItem> </DataTemplate> </TreeView.Resources> <TreeViewItem Header="{Binding Name}" Name="tviRoot" IsExpanded="True" > <TreeViewItem Header="Rooms" ItemsSource="{Binding Rooms}" ItemTemplate="{StaticResource RoomTemplate}"> <TreeViewItem.ContextMenu> <ContextMenu> <MenuItem Header="Add room"></MenuItem> </ContextMenu> </TreeViewItem.ContextMenu> </TreeViewItem> </TreeViewItem> But with this markup the behavior is as intended, but the child items (the rooms) are indented too much. Anyway all the bining samples I could find use TextBlock instead of TreeViewItem in the DataTemplate, but wonder how to integrate the ContextMenu there.

    Read the article

  • Treeview - Link Button Post Back Problem

    - by cagin
    Hi there I' m working on a web application. That has a master page and two pages. These pages under the that master page. I am trying navigate that pages with a TreeView which on the master page. When i click to treeview node i can go to page which i want but there is no postback. But if i use linkbutton postback event happen. I use a break point on master page's pageload event. When i use treeview, v.s doesnt stop on break point line but if i use link button v.s stop on that line. How can i do postback with using treeview? Thanks for your helps

    Read the article

  • treeview and postback

    - by Luis
    hi I have a treeview, and already the javascript code to postback the page. Because when i select the father , auto-select the children. this is my html code <script> function foo() { var o = window.event.srcElement; if (o.tagName == "INPUT" && o.type == "checkbox") { __doPostBack("",""); } } </script> <asp:TreeView ID="HierarchicalTreeView" runat="server" OnSelectedNodeChanged="HierarchicalTreeView_SelectedNodeChanged" ShowLines="True" ExpandImageToolTip="Fechar &quot;{0}&quot;" CollapseImageToolTip="Fechar &quot;{0}&quot;" ExpandDepth="1" OnTreeNodeCheckChanged="HierarchicalTreeView_TreeNodeCheckChanged" EnableClientScripts="true" onClick="foo()"> <NodeStyle CssClass="text" /> <SelectedNodeStyle CssClass="text" Font-Bold="true" /> </asp:TreeView> How can i prevent from postback all page, and only the treeview???, so dont 'refresh' the page

    Read the article

  • TreeView Databinding

    - by Anu
    Hi,I want to add items in treeviewi n WPF.I have function as public void SetTree(string Title,int Boxtype,int BoxNo ) { sBoxType = "Group"; TreeList items = TreeList.Load(Title, sBoxType, BoxNo); DataContext = items; } XAML Code of TreeView: <TreeView Margin="16,275,18,312" x:Name="treeView1" ItemsSource="{Binding}" ItemTemplate="{StaticResource TreeItemTemplate}"> </TreeView> <DataTemplate x:Key="TreeItemTemplate"> <WrapPanel> <TextBlock Text="{Binding Path=Title}" /> <TextBlock Text="{Binding Path=Box}" /> </WrapPanel> </DataTemplate> Actually i wan to TreeView ot display lik +Group (header) Controllersgroup 5 (Child items). As multicolumn child items.But it dislay like Controllersgroup5

    Read the article

  • how to highlight search results in WPF treeview?

    - by Ravi
    I am developing an app ( A database file system ). I am using WPF treeview in its GUI.The treeview items are directly extracted from my apps database. I want to search and highlight the treeview items as I type.(e.g. keyword results shown in browsers) How do I achieve that?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >