Welcome Guest Search | Active Topics | Sign In | Register

Treeview previous, next node client side Options
ITMA
Posted: Saturday, December 28, 2013 6:35:43 AM
Rank: Advanced Member
Groups: Member

Joined: 6/23/2010
Posts: 48
Hi

By different reasons I must use a treeview without raising server event. Still I’m using various functions server side as renaming, moving and so on. However I’ve been not successful identifying the next node or previous node to recalculate the sort order.

My idea is to have those variables available on node drop client side, then passing those values to code behind using ASP.Net Eventtarget or Eventrgument or eventually passing the values by a textbox or similar.

But how to have the values identified? Or is there a way of identifying them code behind not fired/triggered by the treeview itself.

Sorry to admit that I’ve spend some hours to figuring this out from your documentation without success. Brick wall

Best

ITMA
eo_support
Posted: Saturday, December 28, 2013 9:20:54 AM
Rank: Administration
Groups: Administration

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

The TreeNode class provides Value property for you to use. So you can use that property to store whatever information you want to store. That property is visible on the client side through this function:

http://www.essentialobjects.com/doc/1/jsdoc.public.navigationitem.getvalue.aspx

It is also restored on the server side when the page posts back.

Thanks!
ITMA
Posted: Saturday, December 28, 2013 9:33:48 AM
Rank: Advanced Member
Groups: Member

Joined: 6/23/2010
Posts: 48
Thanks!
I know this.

What I'm not are able to find in the documentation is regarding node drop and the ID of previous respectively next node after a move of the node/menu item itself. I need those ids and not values, to recalculate the sort order.


Best

ITMA
eo_support
Posted: Saturday, December 28, 2013 10:49:32 AM
Rank: Administration
Groups: Administration

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

You can handle ClientSideOnDragDrop event. The new node index is passed to you through the last argument:

http://www.essentialobjects.com/doc/1/jsdoc.public.handlers.treeview_dragdrop_handler.aspx

Once you have the new node index, you can then use the TreeView's client side API to get the previous and next node.

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.