Welcome Guest Search | Active Topics | Sign In | Register

Store Meta Information Options
Maxim
Posted: Thursday, January 8, 2009 8:39:19 AM
Rank: Advanced Member
Groups: Member

Joined: 12/26/2008
Posts: 45
I user ContextMenu with TreeView.
I have a complex logic of the menu. Depending on which TreeNode clicked to be displayed or not displayed different menu items. For example:
All TreeNode's of TreeView - it's instance of MyItem.

public class MyItem
{
string Name;
string ExternalID;
string ItemType; (Composite or Primitive)
e.t.c.
}

and all MenuItems of Context Menu - it's instance of MyItem too;

in client side i need Show or hide different MenuItem depend on ItemType, ExternalID of clicked TreeNode.

How can I stroe this information to work with it on the client side?

Sorry for my English and Thanks! :)
eo_support
Posted: Thursday, January 8, 2009 8:47:40 AM
Rank: Administration
Groups: Administration

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

Both TreeNode and MenuItem provide a Value property. You can use that property to store whatever information you would like. Since it's a single property, you will need to take care of encoding/decoding if you wish to store multiple values. The Value property can be accessed on the client side via JavaScript with this function:

http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.NavigationItem.getValue.html

If you are not already familiar with our client side JavaScript interface, you will want to go over this topic:

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

Hope this helps.

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.