This is a migrated thread and some comments may be shown as answers.

ParentNode Collapsing ... the first time only

1 Answer 62 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 27 Nov 2012, 07:20 PM
I am using the latest version of your ASP.Net RadTreeView control.  I have a 5-level hierarchy that looks like this: http://mwtech.com/downloads/public/PassesEditor.jpg

The top 4 levels are uneditable in this editor.  Its sole purpose is to allow the addition of one or more bottom-level nodes (highlighted in blue).

So I added such a node - "Orepass #1", left the module, and returned to it.  My code preserves the data.  I then started opening successive levels in the treeview.  Each of the top 4 levels is added on-the-fly via server-side code.  Each of the nodes on these top 4 levels has its ExpandMode = TreeNodeExpandMode.ServerSideCallBack.

The bottom-level nodes do not define ExpandMode in any way.

What happens is that the first time I enter any particular branch and click on a bottom-level node, its parent unexpectedly collapses.  I've searched my code and don't believe it is causing this to happen.  Furthermore, when you click on a bottom-level node in the same branch a 2nd or 3rd or Nth time, this strange behavior no longer occurs.

I'm convinced I've seen this problem before but have examined all of my past postings on your forum and can't find any specific mention of it.

Any ideas what might be causing this?

Robert

P.S. I *think* my problem may be similar to this: http://www.telerik.com/community/forums/aspnet-ajax/treeview/when-nodeclick-parentnode-has-collapsed.aspx

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 30 Nov 2012, 02:05 PM
Hello Robert,

Please keep in mind that only the nodes added during the NodeExpand event handler are updated during ServerSideCallback load on demand. The expanded node does not get updated - setting its properties will not have immediate effect. You can check the implementation of the NodeExpand event in this online demo. Perhaps you could use the same approach in your application.

Regards,
Boyan Dimitrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeView
Asked by
Robert
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or