Hello! I've got a question about implementation of a standart tree model for TreeView. I have a response from database that lools like [ [A, [a,b,c]], [B,[a,b,c]], . . . [N,[a,b,c]] ] And I want to pass it through treemodel to treeview, for in GUI it looks like that: A | +---a +---b +---c | B + | +---a +---b +---c I've took a look at example, that comes with PyQT4, but in that example they retrieve data from a text file, where tree structure is marked by tabs. and I cannot realize how I can modify this standart example …

Member Avatar
Member Avatar
+0 forum 4

i want to make tree view with all the system drives and folders and subfolder and files how we can do this in vb6.0

Member Avatar
+0 forum 0

Alright, so I found a tutorial on how to use lists to make a "TreeList" type thing, basically a list, ordered or unordered, that has a nested list that is collapsible. However, it doesn't seem to be working for me. Here's some code that I'm sure you will figure out. JavaScript: window.onload = function() { addEvents(); } function addEvents() { activateTree(document.getElementById("navigation")); } function activateTree(oList) { for(var i = 0; i < oList.getElementsByTagName("ul").length; i++) { oList.getElementsByTagName("ul")[i].style.display="none"; } oList.addEventListener("click", toggleBranch, false); } function toggleBranch(event) { var oBranch, cSubBranches; oBranch = event.target, cSubBranches = oBranch.getElementsByTagName("ul"); if(cSubBranches.length > 0) { if(cSubBranches[0].style.display == "block") { …

Member Avatar
+0 forum 0

Hi guys, I need to create a web application in my job using Java, so i started using Netbeans 7.4, and started a new project. Im trying to develop a web application that will be hosted in a server, so i selected Web Application from the Java Web folder. Is this Ok for what i'm looking for? My problem is that i have to create a Treeview that must populate from a server database. I don't know how to create that treeview. I've used treeview before in ASP.NET (just dragged the controller in the design label) populating it with code …

Member Avatar
Member Avatar
+0 forum 1

Hi guys, I have 2 forms which do practical the same thing. They are supposed to show a preview of a file which has been selected from a treeview. However the first form works fine and the second one doesn't. When I look into it the second form produces a path with "$$$$" instead of "\\ ". Ive been over the code a few times trying to figure out what the difference is but with no luck. Heres Form 1 //open tree private void button2_Click(object sender, EventArgs e) { ListDirectory(treeView1,@"C#"); treeView1.ExpandAll(); //empty(); } public TreeNode CreateDirectoryNode(DirectoryInfo directoryInfo) { var directoryNode …

Member Avatar
+0 forum 0

Hi All, I have a problem with a treeview class in my windows form. Specifically I'm try to detect when a user has expanded or contracted a node verses if they have clicked/selected the actual node. When the user clicks on the node, I want to expand / contract the node to Hide / Show the child nodes (if there are any,) and if there is an associated action trigger it. So my code goes like this: Sub SideMenu_MouseClick(sender as Object, e as System.Windows.Forms.TreeNodeMouseClickEventArgs ) Handles SideMenu.MouseClick Dim MyNode As TreeViewNode = e.Node 'here is where the problem occurs if …

Member Avatar
Member Avatar
+1 forum 2

Is there a way to have multiple search entries for one TreeView, each for a different column, or having one search entry handle all columns? The effect I'm looking for is (for example) having three columns, and thus typing into three search boxes to narrow down to the results that match all three. I'm looking at `set_search_equal_func()`, but I don't get what I'm supposed to return/implement in order to set a certain row as part of the search and I can't find anything on it. (If anyone has an example for this, that would be great, thanks!)

Member Avatar
+0 forum 0

Hi! I have a little question. I'm new to WPF, and I've been working with DevExpress, I'm with the TreeListControl right now. How can I change the data format in a field? Specifically, I have a string with the url or route of an image, and I want the tree to display the image instead of the string. How can I achieve this? This is my XAML code so far: <dxg:TreeListControl Name="treeList" ItemsSource="{Binding staff}"> <dxg:TreeListControl.Columns> <dxg:TreeListColumn FieldName="Name" /> <dxg:TreeListColumn FieldName="Position" /> <dxg:TreeListColumn FieldName="Department" /> <dxg:TreeListColumn FieldName="Photo" /> </dxg:TreeListControl.Columns> <dxg:TreeListControl.View > <dxg:TreeListView Name="treeListView1" AutoWidth="True" KeyFieldName="ID" ParentFieldName="ParentID" /> </dxg:TreeListControl.View> </dxg:TreeListControl> This is …

Member Avatar
+0 forum 0

I'm trying to create a treeview which is mostly populted by a database. I have two code snippets which on their own work fine but when I place them together it won't seem to work no matter what I try. Main Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en-GB"> <head> <!--[if gte IE 9 ]><link rel="stylesheet" type="text/css" href="_styles.css" media="screen"><![endif]--> <!--[if !IE]>--><link rel="stylesheet" type="text/css" href="_styles.css" media="screen"><!--<![endif]--> <title>Pure CSS collapsible tree menu</title> </head> <body> <ol class="tree"> <li> <label for="folder3">Overdue</label> <input type="checkbox" id="folder3" /> <ol> <li> <label for="subfolder1">Training and Competence</label> <input type="checkbox" id="subfolder1" /> <ol> <li class="file"><a href="">Subfile 1</a></li> <li class="file"><a …

Member Avatar
Member Avatar
+0 forum 3

I have used treeview to display a local folder. There are few pictures in the hierarchy of folders. I want them to display thumbnails and when I clicked on them it should display bigger view. How is it possible. I wish to use jQuery with Asp.Net and C#

Member Avatar
+0 forum 0

I have looked through a few SQL hierarchy tutorials, but none of them made much sense for my application. Perhaps I am just not understanding them correctly. I'm writing a C# ASP.NET application and I would like to create a tree view hierarchy from SQL data. This is how the hierarchy would work: [code=html] SQL TABLE ID | Location ID | Name _______| __________ |_____________ 1331 | 1331 | House 1321 | 1331 | Room 2141 | 1321 | Bed 1251 | 2231 | Gym [/code] If the ID and Location ID are the same, this would determine the top …

Member Avatar
Member Avatar
+0 forum 10

Greetings :) I'm trying to intercept some Win32 messages; in particular I want to respond to a [icode]TVN_GETDISPINFO[/icode] notification. This notification is sent in the form of a [icode]WM_NOTIFY [/icode](see [URL="http://msdn.microsoft.com/en-us/library/bb773518(v=vs.85).aspx"]here[/URL]) and contains a pointer to [icode]NMTVDISPINFO [/icode]which gives access to a [icode]TVITEM[/icode]. [icode]TVITEM [/icode]has a [icode]LPTSTR pszText[/icode] field that I want to modify. Here's what I don't understand: If the [icode]TVN_GETDISPINFO [/icode]notification is sent as a [icode]WM_NOTIFY [/icode]message, how to I distinguish it from any other [icode]WM_NOTIFY [/icode]message? [CODE] protected override void WndProc(ref Message m) { if (m.Msg == 0x004E) //WM_NOTIFY taken from WinUser.h { //How do I know …

Member Avatar
+0 forum 0

hi all I need help plzzzzzzzzzzzzzzzz my project uses asp.net and sql database I use treeview to insert and retrieve hierarchical data from the database I used the following code the problem is when I added the code for the retrieval the insertion has a problem where I can't add any child to the tree however it was working well before adding that code started from the fill_tree2 [CODE]using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.SqlClient; //using system.input public partial class Study_period …

Member Avatar
+0 forum 0

Hi everyone, I have been working with VB6 for about a week now, so I'm still a newbie. I have a pretty big project coming up and I have a question relating to the capabilities of VB6. I want a GUI that has a "Model" tree on the left, and a bunch of options, text-boxes, drop-down menus etc. in the main form, which are dependent on the branch that is selected in the model tree. In this tree, there are branches that allow me to edit my model, define analysis parameters, perform an analysis, view graphs etc. So I want …

Member Avatar
Member Avatar
+0 forum 1

Can someone please tell me what is the event that is triggered when a user clicks on the + sign in C# TreeView? To elaborate more, here is my problem. I have a tree view that is populated at the time of Form_Load. Then the user can expand/collapse/select etc with it. However, from time to time, the tree view might get data from a service, and once it does and the nodes are changed it will automatically update with new data. This update function is such that it populates the whole tree view from the beginning - simply it calls …

Member Avatar
Member Avatar
+0 forum 2

Hi All I am creating a program which will (in the end) help me quickly transfer products from one category into another within a MySQL Database. I have a database with TWO separate tables which are connected using INNER JOIN where the products have a categoryID as do the categories have categoryID fields. I want to show, in a treeview, all of the categories and then when i 'open' a category, i can see all of the products. eventually I'll add the moving properties, sub categories etc but at the moment i just do not know how to display a …

Member Avatar
Member Avatar
+0 forum 3

I have a TreeView control in VS 2010 that I need to be able to INSERT (not add) nodes to. I have stored a unique key in the TAG for each node and know how to find the value of the tag in the tree. However, I can't figure out how to INSERT a NEW node BEFORE or AFTER the node I have found with this tag. For example, suppose I have the following tree . . . Item 1 ... Item 2 ... Item 3 ... Item 4 ......Item 5 ......Item 6 ......Item 7 ... Item 8 ... Item …

Member Avatar
Member Avatar
+0 forum 17

Hi there, I've made this page in html: [url]http://www.greenbeanbaby.com/retailers.php[/url] with drop-down menus that work. But when I try to make it dynamic for my client to update it, I'm stuck! The drop downs don't work. Here is the code I'm using: [CODE]$r=mysql_query("SELECT * FROM retailer"); $varloop=1; echo "<div id='wrap'>"; while(list($idr, $name)=mysql_fetch_array($r)){ //echo "$name"; //echo "<br />"; $r2=mysql_query("SELECT idp, provinces FROM province WHERE parentidr='$idr'") or die(mysql_error()); while(list($idp, $provinces)=mysql_fetch_array($r2)){ echo ("<span class='product-menu'>"); echo "$provinces"; echo ("</span>"); echo ("<a href='#' id='example.$varloop.-show' class='showLink' onclick='showHide(example.$varloop);return false;'><img src='../images/retailer-down.gif' alt='retailer' width='10' height='8' class='img' /></a>"); echo ("<div id='example.$varloop' class='more'><a href='#' id='example.$varloop.-hide' class='hideLink' onclick='showHide(example.$varloop);return false;'><img src='../images/retailer-up.gif' alt='retailer' width='10' height='8' …

Member Avatar
Member Avatar
+0 forum 5

Hai all,, Currently I'm writing code in ASP.NET using VB language. I got an issue regarding dropdownlist. In my form, I have a treeview and a dropdownlist which are populated with data from database. When I click a node in treeview, the dropdownlist should be populated with values based on the selected node. This works fine at the first time page loading. But when I move to the other node of the treeview (which should trigger different dataset for the dropdownlist), the items inside the dropdownlist aren't changed. No matter how many times I change the selected node of the …

Member Avatar
Member Avatar
+0 forum 8

Hi, I have an application with a treeview, with each node(child) linked to a file. I can read the file name and extension, and I want to put icons to the left of the treeview nodes. (see the picture) For example, if the file is .xls, I will put an excel icon, etc. I know I can do this by creating pictureboxes dynamically, but how can I adjust the lines? Because the application will be run in a lot of different computers which have different screen resolutions. e.g. Can I get directly the pixel size of a treeview line?

Member Avatar
Member Avatar
+0 forum 1

The application is currently developed using ASP.NET (C#) I have code to pull data from a SQL Server 2008 table and organize it into an hierarchy: [code=sql] With hierarchy (id, [location id], name, depth, trail) As ( -- selects the "root" level items. Select ID, [LocationID], Name, 1 As depth, [trail] = cast(Name + '/' as varchar(255)) From dbo.Locations Where ID = [LocationID] Union All -- selects the descendant items. Select child.id, child.[LocationID], child.name, parent.depth + 1 As depth, [trail] = cast(trail + child.name + '/' as varchar(255)) From dbo.Locations As child Inner Join hierarchy As parent On child.[LocationID] = …

Member Avatar
+0 forum 0

hi! how can i populate a treeview with this: [CODE]ObservableCollection<ProjectTreeview> trvProject = new ObservableCollection<ProjectTreeview>() { new ProjectTreeview(){ID=1, ParentID=0, Type="P", Name="Project Name"}, new ProjectTreeview(){ID=2, ParentID=1, Type="F", Name="Field 1"}, new ProjectTreeview(){ID=3, ParentID=1, Type="F", Name="Field 2"}, new ProjectTreeview(){ID=4, ParentID=2, Type="S", Name="Structure A"}, new ProjectTreeview(){ID=5, ParentID=3, Type="S", Name="Structure B"}, new ProjectTreeview(){ID=6, ParentID=4, Type="C", Name="Component A1"}, new ProjectTreeview(){ID=7, ParentID=5, Type="C", Name="Component B1"}, new ProjectTreeview(){ID=8, ParentID=6, Type="CA1", Name="Component A2"}, new ProjectTreeview(){ID=9, ParentID=7, Type="CB1", Name="Component B2"} };[/CODE] The heirarchy is based on the ParentID. Thanks :)

Member Avatar
Member Avatar
+0 forum 1

Hi all, I can't figure out how to select a child node when I already know its parent [Index] and the child's [Index] itself. Imagine a treeview like this: + Parent[0] |--- Child [0] |--- Child [1] + Parent[1] |--- Child [0] |--- Child [1] |--- Child [2] So how can I wrote a code to select (or find) the Child with index 1 from parent with index 1? Thanks

Member Avatar
Member Avatar
+0 forum 3

I'm trying to create a tree with the following very small access database. I'm still getting a few errors, 'rdr' is a 'variable' but used like a 'method' and trying to get tree to actually populate.. If you find any other errors or recommendations, they're greatly appreciated. Thanks a lot. DatabaseName is [B]PartsTree[/B] TableName is [B]Parts[/B] [U]ID[/U] [U]parent_ID[/U] [U]description[/U] 1------null------Car 2------1------Wheels 3------2------Rims 4------2------Hubcabs 5------2------Lugnuts 6------1------Engine 7------6------Pistons .------.------. .------.------. .------.------. [CODE] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.OleDb; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() …

Member Avatar
Member Avatar
+0 forum 1

Hello people, I decided to make a family tree as a graduation project, I've thought about multiple ways to make it, but I like some fresh ideas, in case i forgot some things. I'm trying to keep the project as easy as possible, because in the end I will need to explain the code to my teachers. I already made a schematic how I would like the tree (All family trees look the same anyways so nothing new there). But the thing where I'm kind of stuck is the way to store/call the whole tree from the DB. Ok, so …

Member Avatar
+0 forum 0

I have a very weird problem with my TreeView OnSelectedNodeChanged event. I have dynamically populated the whole tree via sql and one table. Everything was working correctly until I tried to add rdls to the mix, My treeview populates correctly but when I try to add two reports to my treeview the OnSelectedNodeChanged event is getting the wrong information for my rdl's, it is still running one and ignoring the second one. I've debugged it and when the event fires the wrong information is getting sent back to my code behind, I've never encountered this before in .NET. why would …

Member Avatar
+0 forum 0

hi all hope that all of u are fine : ) well i want to draw a tree [B]not a binary tree[/B] but i can't find an efficient algorithm to draw it the big problem when the tree is unbalanced Thanks ur help will be greatly appreciated : )

Member Avatar
Member Avatar
+0 forum 3

Hi, In my ASP.NET page I have a TreeView where ShowCheckBoxes="Leaf". I want to mark as checked/unchecked all the visible checkboxes by clicking in a button. My code for selecting all/none nodes is like this: [CODE=javascript]function selectAllNone(tvID, value) { var tvNodes = document.getElementById(tvID); var chBoxes = tvNodes.getElementByTagName("input"); for (var i = 0; i < chBoxes.length; i++) { var chk = chkBox[i]; if (chk.type == "checkbox") { chk.cheked = value; } } }[/CODE] However, in the line var chBoxes = [B]tvNodes.getElementByTagName("input");[/B]I'm having this error message: object doesn't support this property or method. How do I checj/uncheck all the checkboxes, then? Thanks, …

Member Avatar
Member Avatar
+0 forum 12

I have an ASP.Net 2.0 application (VS.Net 2008/C#). I want to populate the Treeview on my page using javascript. So far I have heard not so positive views about populating using javascript. Still I want to give it a shot. Any help is greatly appreciated.

Member Avatar
Member Avatar
+0 forum 1

Hello everybody, For the last 2 days im trying to deal with a treeview. What i want to do is to copy the structure from one tree to another. I know there are other ways to do this, but the way i want is to iterate through any node-of any depth-. Im using Telerik's GridView. The code below is the work that i've done so far, but when i run it it throws an Exception saying:"[B][I]The collection has changed. The iteration may not be executed[/I][/B]". Im first calling the [B][I]CopyTree()[/I][/B] function: [CODE] public void CopyTree(RadTreeView trv) { NodesArr = new …

Member Avatar
Member Avatar
+0 forum 3

The End.