Welcome Guest Search | Active Topics | Sign In | Register

TreeView Options
BruceL
Posted: Thursday, May 15, 2008 1:58:06 AM
Rank: Newbie
Groups: Member

Joined: 5/15/2008
Posts: 1
Hello, we want to add a tree view control to our simple web GIS system to allow us to better display the available layers to the user. The current version is here:

PlanMaps

Your tree view control looks good and seems to offer what we need so I downloaded your demo version and have been trying it out, but am having some problems adding sub item tree nodes programatically. I don't want to bind the tree view to a dataset, but add each item from code. I would have a set of Items say: Planning, Environment, Public Space and under each of these a number of sub items for each layer with check boxes so layers can be turned on and off. I would be grateful for confirmation that this is possible with your control and some pointers to how it would be done before I take it further and suggest buying your tools.

many thanks

Bruce
eo_support
Posted: Thursday, May 15, 2008 6:20:23 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,091
Yes. Just do something like this:

Code: C#
//Create a root node
EO.Web.TreeNode node = new EO.Web.TreeNode("Planning");
TreeView1.Nodes.Add(node);

//Create a child node
EO.Web.TreeNode childNode = new EO.Web.TreeNode("Planning Layer1");
TreeView1.Nodes[0].ChildNodes.Add(childNode);

....


Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.