Welcome Guest Search | Active Topics | Sign In | Register

Treeview ItemNodes Options
kennaxx
Posted: Thursday, May 14, 2009 8:20:16 AM
Rank: Advanced Member
Groups: Member

Joined: 4/30/2009
Posts: 36

On the _ItemPopulate(object sender, EO.Web.NavigationItemEventArgs e) event, when a node that has a parent is clicked to be populated, it shows the parent as being null. However, the ASP Treeview does show the parent as existing.

I want to be able to expand a node and then recursively find the root node.

Thanks

Kennaxx
eo_support
Posted: Thursday, May 14, 2009 8:33:45 AM
Rank: Administration
Groups: Administration

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

The parent node is intentionally omitted for both performance reason and to avoid confusions. Many users tried to modify the parent node during populate on demand and only to later realize that won't work. As a result e.TreeNode is always an orphan node during populate on demand.

The recommend practice for this is to always store some kind of key information in your TreeNode.Value. For example, you can store your "record_id" inside TreeNode.Value. You would then solely rely on this "record_id" to find all child records (for populating child nodes), or to find parent record (for looking up parent nodes), or to perform any other actions such as update/delete records.

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.