Welcome Guest Search | Active Topics | Sign In | Register

Select TreeNode from server Side Options
Maxim
Posted: Tuesday, January 13, 2009 12:55:22 AM
Rank: Advanced Member
Groups: Member

Joined: 12/26/2008
Posts: 45
How i can select TreeNode from server Side?

From client side - it's .getParentItem().select();
Thanks.
eo_support
Posted: Tuesday, January 13, 2009 4:13:35 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

It will be MenuItem.Selected = true on the server side. You can find the full reference of the server side interface here:

http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.html

Thanks!
Maxim
Posted: Tuesday, January 13, 2009 4:53:16 AM
Rank: Advanced Member
Groups: Member

Joined: 12/26/2008
Posts: 45
if make MenuItem.Selected = true and no changes.
TreeView in SingleSelection Mode and i not see that my item selected, and i was't handle event about ItemClicked.

Thanks
eo_support
Posted: Tuesday, January 13, 2009 4:56:29 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Have you tried TreeView.SelectedNode = someNode?

Thanks
Maxim
Posted: Tuesday, January 13, 2009 5:13:44 AM
Rank: Advanced Member
Groups: Member

Joined: 12/26/2008
Posts: 45
TreeView.SelectedNode has no setter :)

Thanks.
eo_support
Posted: Tuesday, January 13, 2009 10:17:01 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We tried the following code and it worked fine:

Code: C#
//Get the second child node of the first top level node
TreeNode node = TreeView1.TopGroup.Nodes[0].ChildNodes[1];

//Select the node
node.Selected = true;
node.EnsureVisible();


Note that the code calls EnsureVisible to so that you can see the node is selected.

Thanks!
Maxim
Posted: Wednesday, January 14, 2009 7:33:00 AM
Rank: Advanced Member
Groups: Member

Joined: 12/26/2008
Posts: 45
With node.EnsureVisible(); worked!

Thanks!Thanks!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.