Search Results

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

Page 9/22 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Asp.net MVC Calling ActionLink in Codebehind

    - by SSA
    I am new to asp.net and MVC, so please go easy on me. :) I have successfully made a small MVC application. There is a database that contains a table named "Entry" and I have made Controllers for this. Also I have a view for Details and list. This works fin. My problem is in my index page. (not the view Index, but the frontpage). There I dynamically build a TreeView as a menu, with some Categories. In this menu there is under the categories there is my Entries from the database. They show up fin. I insert the entries as a TreeNode what holds the entry id and so forth. What I want is: that the entries in my treeview work as a link to the Detail view of the Entry. So if I click on a entry in the TreeView it will show the Detail page of this Entry. But I can't make it work. How to I use the <%= Html.ActionLink() % in codebehind? Or is it this the wrong way? If calling the view or controller in codebehind is the wrong way to do it. Then how? Thanks in advance.

    Read the article

  • geting information from Treeview with HierarchicalDataTemplate

    - by lina
    Good day! I have such a template: <common:HierarchicalDataTemplate x:Key="my2ndPlusHierarchicalTemplate" ItemsSource="{Binding Children}"> <StackPanel Margin="0,2,5,2" Orientation="Vertical" Grid.Column="2"> <CheckBox IsTabStop="False" IsChecked="False" Click="ItemCheckbox_Click" Grid.Column="1" /> <TextBlock Text="{Binding Name}" FontSize="16" Foreground="#FF100101" HorizontalAlignment="Left" FontFamily="Verdana" FontWeight="Bold" /> <TextBlock Text="{Binding Description}" FontFamily="Verdana" FontSize="10" HorizontalAlignment="Left" Foreground="#FFA09A9A" FontStyle="Italic" /> <TextBox Width="100" Grid.Column="4" Height="24" LostFocus="TextBox_LostFocus" Name="tbNumber"></TextBox> </StackPanel> </common:HierarchicalDataTemplate> for a Treeview <controls:TreeView x:Name="tvServices" ItemTemplate="{StaticResource myHierarchicalTemplate}" ItemContainerStyle="{StaticResource expandedTreeViewItemStyle}" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="3" BorderBrush="#FFC1BCBC" FontFamily="Verdana" FontSize="14"> </controls:TreeView> I want to know the Name property of each TextBox in Treeview to make validation of each textbox such as: private void TextBox_LostFocus(object sender, RoutedEventArgs e) { tbNumber.ClearValidationError(); if ((!tbNumber.Text.IsZakazNumberValid()) && (tbNumber.Text != "")) { tbNumber.SetValidation(MyStrings.NumberError); tbNumber.RaiseValidationError(); isValid = false; } else { isValid = true; } } and I wnat to see what check boxes were checked how can I do it?

    Read the article

  • TreeNode Selection Problems in C#

    - by user455046
    Whenever I click outside the tree nodes text, on the control part, it tigers a node click event- but doesn't highlight the node. I am unsure why this is happening. I want the node to be selected on a click- when you click the nodes text- not the whitespace- I only assume that the nodes width reaches across the whole Treenode? I have the Treeview on dock.fill mode if that has something to do with it- I tried everything but can't get it to behave correctly. Maybe someone will know what's going on. Update: if (e.Location.IsEmpty) { Seems to work better- but still selects the node in the blank place where there is no text- Obviously the node width extends across the whole treeview it seems? Is there a better way to accomplish what I want? Or is that the best way? UPDATE: Previous idea isn't working- sigh- I thought it did it but it didn't. New Problem : I think part of the problem is related to the focus now when I switch from treeview.

    Read the article

  • wpf treeview collapse/expand option disappeared

    - by Muhammad Adnan
    I used following code <!-- TreeView --> <Style x:Key="{x:Type TreeView}" TargetType="TreeView"> <Setter Property="OverridesDefaultStyle" Value="True" /> <Setter Property="SnapsToDevicePixels" Value="True" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="TreeView"> <Border Name="Border" CornerRadius="1" Background="{StaticResource WindowBackgroundBrush}" BorderBrush="{StaticResource SolidBorderBrush}" BorderThickness="1"> <ScrollViewer Focusable="False" CanContentScroll="False" Padding="4"> <ItemsPresenter/> </ScrollViewer> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- TreeViewItem --> <Style x:Key="TreeViewItemFocusVisual"> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate> <Border> <Rectangle Margin="0,0,0,0" StrokeThickness="5" Stroke="Black" StrokeDashArray="1 2" Opacity="0"/> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="{x:Type TreeViewItem}" TargetType="{x:Type TreeViewItem}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> <Setter Property="Padding" Value="1,0,0,0"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> <Setter Property="FocusVisualStyle" Value="{StaticResource TreeViewItemFocusVisual}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TreeViewItem}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition/> </Grid.RowDefinitions> <Border Name="Bd" Grid.Column="0" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"> <ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/> </Border> <ItemsPresenter x:Name="ItemsHost" Visibility="Visible" Grid.Row="1" Grid.Column="0"/> </Grid> <ControlTemplate.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="HasHeader" Value="false"/> <Condition Property="Width" Value="Auto"/> </MultiTrigger.Conditions> <Setter TargetName="PART_Header" Property="MinWidth" Value="75"/> </MultiTrigger> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="HasHeader" Value="false"/> <Condition Property="Height" Value="Auto"/> </MultiTrigger.Conditions> <Setter TargetName="PART_Header" Property="MinHeight" Value="19"/> </MultiTrigger> <Trigger Property="IsSelected" Value="true"> <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/> </Trigger> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="true"/> <Condition Property="IsSelectionActive" Value="false"/> </MultiTrigger.Conditions> <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> </MultiTrigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </Window.Resources> <Grid> <TreeView> <TreeViewItem Header="Node 1"> <TreeViewItem Header="Node 1.1"> <TreeViewItem Header="Node 1.1.1" /> </TreeViewItem> </TreeViewItem> <TreeViewItem Header="Node 2"> <TreeViewItem Header="Node 2.1"> <TreeViewItem Header="Node 2.1.1" /> </TreeViewItem> <TreeViewItem Header="Node 2.2"> <TreeViewItem Header="Node 2.2.1" /> </TreeViewItem> </TreeViewItem> </TreeView> </Grid> taken from this url... http://stackoverflow.com/questions/1526925/can-i-have-a-treeview-without-the-tree-structure NOW I AM HAVING PROBLEM. I LOST COLLAPSE/EXPAND OPTIONS... HOW CAN I HAVE WITH THIS CODE...

    Read the article

  • WPF Tree doesn't work

    - by phenevo
    Could you tell me why I can't see subItems? I've got winforms apps and I added my wpfusercontrol:ObjectsAndZonesTree ServiceProvider is my webservice. Adn method to get listofcountires with subitems works properly (i get countires, regions from this countires, provinces etc...) ElementHost elementHost = new ElementHost { Width = 150, Height = 50, Dock = DockStyle.Fill, Child = new ObjectsAndZonesTree() }; this.splitContainer3.Panel1.Controls.Add(elementHost); XAML: <TreeView Name="GroupView" Grid.Row="0" Grid.Column="0" ItemsSource="{Binding}"> <TreeView.Resources> <HierarchicalDataTemplate DataType="{x:Type ServiceProvider:Country }" ItemsSource="{Binding Items}"> <TextBlock Text="{Binding Path=Name}" /> </HierarchicalDataTemplate> <DataTemplate DataType="{x:Type ServiceProvider:Region}" > <TextBlock Text="{Binding Path=Name}" /> </DataTemplate> <DataTemplate DataType="{x:Type ServiceProvider:Province}" > <TextBlock Text="{Binding Path=Name}" /> </DataTemplate> </TreeView.Resources> </TreeView> XAML.CS public ObjectsAndZonesTree() { InitializeComponent(); LoadView(); } private void LoadView() { GroupView.ItemsSource = new ServiceProvider().GetListOfObjectsAndZones(); } class Country: public class Country { string _name; [XmlAttribute] public string Name { get { return _name; } set { _name = value; } } string _code; [XmlAttribute] public string Code { get { return _code; } set { _code = value; } } string _continentCode; [XmlAttribute] public string ContinentCode { get { return _continentCode; } set { _continentCode = value; } } public Region[] ListOfRegions { get { return _listOfRegions; } set { _listOfRegions = value; } } private Region[] _listOfRegions; public IList<object> Items { get { IList<object> childNodes = new List<object>(); foreach (var group in this.ListOfRegions) childNodes.Add(group); return childNodes; } } } Class Region: public class Region { private Province[] _listOfProvinces; private string _name; private string _code; public Province[] ListOfProvinces { get { return _listOfProvinces; } set { _listOfProvinces = value; } } public string Name { get { return _name; } set { _name = value; } } public string Code { get { return _code; } set { _code = value; } } public string CountryCode { get { return _countryCode; } set { _countryCode = value; } } private string _countryCode; public IList<object> Items { get { IList<object> childNodes = new List<object>(); foreach (var group in this.ListOfProvinces) childNodes.Add(group); return childNodes; } } } It displays me only list of countires.

    Read the article

  • TreeViewItem - Use ControlTemplate and HierarchicalDataTemplate together

    - by CrownJ
    I'm using HierarchicalDataTemplate in my TreeView, and I wanted to also overwrite the default template for the TreeViewItem so that when an item is selected, it only highlights the text, not including the icon next to it. <TreeView.ItemTemplate> <HierarchicalDataTemplate ItemsSource="{Binding Children}"> <TreeViewItem Style="{StaticResource TreeViewItemStyle}" Header="{Binding DisplayText}" /> </HierarchicalDataTemplate> </TreeView.ItemTemplate> <TreeView.Resources> <Style x:Key="TreeViewItemFocusVisual"> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate> <Rectangle/> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}"> <Setter Property="Focusable" Value="False"/> <Setter Property="Width" Value="19"/> <Setter Property="Height" Value="13"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ToggleButton}"> <Border Width="19" Height="13" Background="Transparent"> <Border Width="9" Height="9" SnapsToDevicePixels="true" BorderBrush="#FF7898B5" BorderThickness="1" CornerRadius="1"> <Border.Background> <LinearGradientBrush EndPoint="1,1" StartPoint="0,0"> <GradientStop Color="White" Offset=".2"/> <GradientStop Color="#FFC0B7A6" Offset="1"/> </LinearGradientBrush> </Border.Background> <Path x:Name="ExpandPath" Fill="Black" Margin="1,1,1,1" Data="M 0 2 L 0 3 L 2 3 L 2 5 L 3 5 L 3 3 L 5 3 L 5 2 L 3 2 L 3 0 L 2 0 L 2 2 Z"/> </Border> </Border> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter Property="Data" TargetName="ExpandPath" Value="M 0 2 L 0 3 L 5 3 L 5 2 Z"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="{x:Type TreeViewItem}" TargetType="{x:Type TreeViewItem}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> <Setter Property="Padding" Value="1,0,0,0"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> <Setter Property="FocusVisualStyle" Value="{StaticResource TreeViewItemFocusVisual}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TreeViewItem}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition/> </Grid.RowDefinitions> <ToggleButton x:Name="Expander" Style="{StaticResource ExpandCollapseToggleStyle}" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"/> <StackPanel Orientation="Horizontal" Grid.Column="1" > <Image Width="16" Height="16" Margin="3,0" Source="{Binding Path=ImageSource}" /> <Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Margin="0" Padding="0"> <ContentPresenter x:Name="PART_Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header"/> </Border> </StackPanel> <ItemsPresenter x:Name="ItemsHost" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1"/> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsExpanded" Value="false"> <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/> </Trigger> <Trigger Property="HasItems" Value="false"> <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/> </Trigger> <Trigger Property="IsSelected" Value="true"> <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/> <Setter Property="Control.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/> </Trigger> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="true"/> <Condition Property="IsSelectionActive" Value="false"/> </MultiTrigger.Conditions> <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/> <Setter Property="Control.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> </MultiTrigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="VirtualizingStackPanel.IsVirtualizing" Value="true"> <Setter Property="ItemsPanel"> <Setter.Value> <ItemsPanelTemplate> <VirtualizingStackPanel/> </ItemsPanelTemplate> </Setter.Value> </Setter> </Trigger> </Style.Triggers> </Style> </TreeView.Resources> I couldn't find a way to use both the HierarchicalDataTemplate and ControlTemplate together so I can specify the ItemsSource and also change parts of the control's behavior. When I do the above code, it won't select the treeviewitem at all.

    Read the article

  • ASP.Net Treeview - Client side event handling (jQuery??)

    - by The Great Gonzo
    I have a Treeview (bog standard ASP.Net Treeview) that is bound to an Xml source which allows the user to navigate to various parts of our system. Nothing special.... However, I wanted to generate a breadcrumb for use in the main content area on the client side when the user clicks a node in the Treeview control. I know there are mechanisms available for breadcrumb generation (such as site maps) but for various reasons I need to do it when a node is clicked. So far hooking up a click event using the document ready function available as part of jQuery is easy. However, having spent sometime looking I can not see how I navigate back up the tree nodes to get to each parent nodes text value to build the breadcrumb. I have been playing with .parent(), .parents() and .closest() available via jQuery but don't seem to be getting anywhere. Has anyone done anything like this or can anyone provide a better method? Thanks in advance....

    Read the article

  • Problem TreeView OnTreeNodePopulate event

    - by purnang.advant
    Hi. I am using a treeview in asp.net 3.5(using c#.net),which is populated from sqldatabase. OnTreeNodePopulate event fires this event, protected void tvLabs_TreeNodePopulate(object sender, System.Web.UI.WebControls.TreeNodeEventArgs e) { PopulateSubLevelLab(e.Node.Value, e.Node); //This function is used for populating the child node. FillLabGrid(e.Node.Value);---My Question? } ---My Question? The FillLabGrid method used for fill a grid view on the basis of selecting the treeview parent node. But this function filled the grid only once when i click the parent node for the first time. Secondly when i collapse the treeview and again click on the parent node function (tvLabs_TreeNodePopulate)is not called? Hope you are getting my point. Please advice me. Thanks in advance.

    Read the article

  • Treeview insert property problem

    - by curiosity
    TreeNode[] nodes = this.treeview.Nodes.Find(node.Text, true); if (nodes.Length > 0) { int i = nodes[0].Index; if (nodes.Length > 0) this.treeview.Nodes.Remove(nodes[0]); this.treeview.Nodes.Insert(i, nodes[0]); } i tried this code, but the node nodes[0] is not inserting into the particular index. instead it is adding at the last. but yes i use treeviewsorter. Any idea how to insert node without using insert or using insert effectively with treeviewsorter??

    Read the article

  • IHierarchyData and IHierarchicalEnumerable in Winforms

    - by Jonathan
    Hi! Currently,I know how to do a lazy implementation of the loading procedure of the nodes in a treeview control, and read the related questions in stackoverflow, but I'm also reading about IHierarchyData and IHierarchicalEnumerable interfaces in asp.net (I didn't know to code asp.net) that allow to bind a collection to a treeview in order to display the items automatically. It would like to know if I can do the same in winforms and C#. I think that the interfaces previous mentioned are not available in winforms. Thanks.

    Read the article

  • ASP.NET Menu: how to build custom menu

    - by Turi
    hi all, i have this situation: i have to build a menu with datasource from the db, because i have to filter them among the user that is loged in. i have tried building a menu using repeater, and all this works fine till i realized that i wanted the menu with more than two levels. i have also tried with treeview, but i really don't want this solution (problem with the style and the treeview doesn't have a pretty view). Could anyone give me just the idea ? thnx in advance.

    Read the article

  • How to use a control like the one in Visual Studio's Class Details window

    - by Chapso
    There is a control in Visual Studio's Class Details window (accessed via Class Diagram) which combines a ListView with a TreeView. The result looks something like this: TreeViewNode1 Column 1 Column 2 Column 3 Column 1 Column 2 Column 3 TreeViewNode2 Column 1 Column 2 Column 3 Column 1 Column 2 Column 3 All of the TreeView Nodes are collapsable so that you can view only the nodes you want to. I am looking to implement this, but it doesn't seem to be a .net control. Does anyone know of a control which already exists that allows this? It has to be free (as in beer).

    Read the article

  • LINQ2SQL: orderby note.hasChildren(), name ascending

    - by Peter Bridger
    I have a hierarchical data structure which I'm displaying in a webpage as a treeview. I want to data to be ordered to first show nodes ordered alphabetically which have no children, then under these nodes ordered alphabetically which have children. Currently I'm ordering all nodes in one group, which means nodes with children appear next to nodes with no children. I'm using a recursive method to build up the treeview, which has this LINQ code at it's heart: var filteredCategory = from c in category orderby c.Name ascending where c.ParentCategoryId == parentCategoryId && c.Active == true select c; So this is the orderby statement I want to enhance. Shown below is the database table structure: [dbo].[Category]( [CategoryId] [int] IDENTITY(1,1) NOT NULL, [Name] [varchar](100) NOT NULL, [Level] [tinyint] NOT NULL, [ParentCategoryId] [int] NOT NULL, [Selectable] [bit] NOT NULL CONSTRAINT [DF_Category_Selectable] DEFAULT ((1)), [Active] [bit] NOT NULL CONSTRAINT [DF_Category_Active] DEFAULT ((1))

    Read the article

  • How to Check all the nodes in tree view with minimum complexity

    - by Vinni
    I need to check/select all the nodes in a tree view with minimum complexity. My tree view has 3 levels and many nodes in it. below is my code: <asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1" ShowCheckBoxes="All" ShowExpandCollapse="true" <DataBindings> <asp:TreeNodeBinding DataMember="Category" TextField="Name" ValueField="Value" /> <asp:TreeNodeBinding DataMember="LeafCategory" TextField="Name" ValueField="Value" /> <asp:TreeNodeBinding DataMember="ChildCategory" TextField="Name" ValueField="Value" /> <asp:TreeNodeBinding DataMember="SubCategory" TextField="Name" ValueField="Value" /> <asp:TreeNodeBinding DataMember="Categories" TextField="Name" ValueField="Value" /> </DataBindings> </asp:TreeView>

    Read the article

  • how to build custom menu using asp.net

    - by Turi
    hi all, i have this situation: i have to build a menu with datasource from the db, because i have to filter them among the user that is loged in. i have tried building a menu using repeater, and all this works fine till i realized that i wanted the menu with more than two levels. i have also tried with treeview, but i really don't want this solution (problem with the style and the treeview doesn't have a pretty view). Could anyone give me any ideas ? thnx in advance.

    Read the article

  • trouble setting up TreeViews in pygtk

    - by Chris H
    I've got some code in a class that extends gtk.TreeView, and this is the init method. I want to create a tree view that has 3 columns. A toggle button, a label, and a drop down box that the user can type stuff into. The code below works, except that the toggle button doesn't react to mouse clicks and the label and the ComboEntry aren't drawn. (So I guess you can say it doesn't work). I can add rows just fine however. #make storage enable/disable label user entry self.tv_store = gtk.TreeStore(gtk.ToggleButton, str, gtk.ComboBoxEntry) #make widget gtk.TreeView.__init__(self, self.tv_store) #make renderers self.buttonRenderer = gtk.CellRendererToggle() self.labelRenderer = gtk.CellRendererText() self.entryRenderer = gtk.CellRendererCombo() #make columns self.columnButton = gtk.TreeViewColumn('Enabled') self.columnButton.pack_start(self.buttonRenderer, False) self.columnLabel = gtk.TreeViewColumn('Label') self.columnLabel.pack_start(self.labelRenderer, False) self.columnEntry = gtk.TreeViewColumn('Data') self.columnEntry.pack_start(self.entryRenderer, True) self.append_column(self.columnButton) self.append_column(self.columnLabel) self.append_column(self.columnEntry) self.tmpButton = gtk.ToggleButton('example') self.tmpCombo = gtk.ComboBoxEntry(None) self.tv_store.insert(None, 0, [self.tmpButton, 'example label', self.tmpCombo]) thanks.

    Read the article

  • how to render custom columns with a GenericTreeModel

    - by Giorgio Gelardi
    I have to display some data in a treeview. The "real" data model is huge and I cannot copy all the stuff in a TreeStore, so I guess I should use a GenericTreeModel to act like a virtual treeview. Btw the first column is the classic icon+text style and I think I should declare a column with a CellRendererPixbuf (faq sample), but I'm not sure what the model methods on_get_n_columns() and on_get_value() should return. It's both a Pixbuf and a string value for the same column. Any help will be appreciated.

    Read the article

  • TreeView Controls - HTREEVIEW

    - by nXqd
    I'm new to win32 API programming and I try to understand source code of treeview from codeproject. But I really don't understand this : BOOL TreeView::DoNotify(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { // blah blah HTREEVIEW Selected = (HTREEITEM)SendDlgItemMessage(hWnd,ID_TREE,TVM_GETNEXTITEM,TVGN_CARET,(LPARAM)Selected); // halb halb } It doesn't work ( Selected is used without initializing) until I declare Selected as global variable. Thanks for reading this and I need your help .

    Read the article

  • Problem on Last node of the treeview

    - by Domnic
    im using Treeview in my master page...and every node except last node get selected if i click on it and can be redirect to respond treenode page...but when i click last node of the treeview the selectednode changed event doesnt fired it just stop page load event itself(breakpoint)..... how can i solve this problem?

    Read the article

  • Editable TreeView

    - by Mostafa Mahdieh
    I need a treeview with the following features: ability to drag and drop nodes inside the treeview there are buttons on the top, that allow to move items up and down. editable node text Is there any implementation of this available? If not all, Is there an implementation of feature 1 available?

    Read the article

  • 'Auto' option missing for TreeView subclass

    - by Jared
    I've created a custom control that subclasses TreeView. Right now it's completely empty, doesn't override anything. However when I place an instance in the designer the 'Auto' value for the Width and Height fields is no longer available as it is with the default TreeView. What am I missing?

    Read the article

  • Bind Icon depending on Enum in WPF Treeview

    - by phenevo
    Hi, I have at treeeview TextBox, and I want convert my Enum: <TextBlock TextAlignment="Justify" VerticalAlignment="Center" Text="{Binding Path=AcceptationStatusGlobalFlag}" /> public enum AcceptationStatusGlobalFlag { NotReady = 0, Ready = 1, AcceptedByAdmin=2 } To Icons. There will be 3 icons, let say ready.jpg, notready.jpg and AcceptedByAdmin.jpg Country and Region has pool AcceptationStatusGlobalFlag and on both I want to display this enum/Icon <TreeView Name="structureTree" SelectedItemChanged="structureTree_SelectedItemChanged" Grid.Row="0" Grid.Column="0" ItemsSource="{Binding}" Height="413" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible" Width="Auto" PreviewMouseRightButtonUp="structureTree_PreviewMouseRightButtonUp" FontFamily="Verdana" FontSize="12"> <TreeView.Resources> <HierarchicalDataTemplate DataType="{x:Type ServiceMy:Country}" ItemsSource="{Binding Path=ListOfRegions}"> <StackPanel Orientation="Horizontal"> <TextBlock TextAlignment="Justify" VerticalAlignment="Center" Text="{Binding Path=Name}"/> <TextBlock TextAlignment="Justify" VerticalAlignment="Center" Text=" H:"/> <TextBlock TextAlignment="Justify" VerticalAlignment="Center" Text="{Binding Path=NumberOfHotels}"/> <TextBlock TextAlignment="Justify" VerticalAlignment="Center" Text=" "/> <TextBlock TextAlignment="Justify" VerticalAlignment="Center" Text=" FG:"/> <TextBlock TextAlignment="Justify" VerticalAlignment="Center" Text="{Binding Path=AcceptationStatusGlobalFlag}" /> <!--<Button Name="BTNAddRegion" Height="20" Content="+" Click="BTNAddRegion_Click"></Button>--> </StackPanel> </HierarchicalDataTemplate> <HierarchicalDataTemplate DataType="{x:Type ServiceMy:Region}" ItemsSource="{Binding Path=ListOfProvinces}"> <StackPanel Orientation="Horizontal"> <TextBlock TextAlignment="Justify" VerticalAlignment="Center" Text="{Binding Path=Name}"/> <TextBlock TextAlignment="Justify" VerticalAlignment="Center" Text=" H:"/> <TextBlock TextAlignment="Justify" VerticalAlignment="Center" Text="{Binding Path=NumberOfHotels}"/> <TextBlock TextAlignment="Justify" VerticalAlignment="Center" Text=" "/> <!--<Button Name="BTNAddProvince" Height="20" Content="+" Click="BTNAddProvince_Click"></Button>--> </StackPanel> </DataTemplate> </TreeView.Resources> </TreeView> </GroupBox> </StackPanel> </Grid>

    Read the article

  • Moving the ScrollBar To the Selected Node In A TreeView Control

    - by Nick LaMarca
    I have a treeview control where I am dynamically selecting a node depending on user interaction. when a node is selected I want to be able to have the scrollbar go to the location of that selected node in the tree. The scrollbar is simply made by overflow:auto in the div tag where the treeview is located. Can someone give me some detailed code to accomplish this? Thanks in advance.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >