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

Image disappears after NodeClick

4 Answers 119 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jonathan Torres
Top achievements
Rank 1
Jonathan Torres asked on 13 Nov 2009, 06:45 PM
I am populating a RadTreeView through code and adding an image as a child node using the node.Controls.Add statement.  The tree will display fine. including the image.  When I click on a node, the image will disappear and be replaced with the node.text information.

I thought this was a problem involving postback and usercontrols, but I see the same behavior when the radtreeview is embedded inside a radajaxpanel control.

It seems odd to me that only the image would disappear while the rest of the tree nodes are unchanged.

Any help would be appreciated.

Thanks

4 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 18 Nov 2009, 10:27 AM
Hi Jonathan,

Dynamically added controls should be re-added on every postback, even when the treeview is inside ajaxpanel.

Best regards,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Narayanan
Top achievements
Rank 1
answered on 01 Sep 2010, 09:16 AM
I am facing the same problem and I am not adding the RadTreeView control dynamically!!!

The above explanation that all dynamically added controls must be re-added doesnt make sense. The image disappears even if the RadTreeView control is not dynamically added.

What is dynamically added are the RadTreeNodes. Re-adding RadTreeNodes everytime is meaningless and doesnt serve the purpose. The problem is else where and the solution suggested is not relevant in this case. The RadTreeView is populated using the Web Service method in my case.


The Problem :

The tree always populates. When the + image is clicked the tree populates [node expands] with the images being correctly displayed. When a tree node is collapsed, it again works properly with the - image being replaced with a + image.
The problem starts when the node is selected or clicked. The image against the selected node and all its child nodes disappears!!! Post this clicking on any node or expanding / collapsing any node, results in that nodes image along with its child nodes' image not being displayed. At the same time, the area where the image is supposed to be displayed still remains clickable thereby allowing expan/collapse of the  node.

Will appreciate a solution to this issue. Is this issue browser specific? or Telerik version problem? CSS related issue?

Thanks

NR
0
Narayanan
Top achievements
Rank 1
answered on 05 Sep 2010, 06:06 AM
As per my finding, this happens due to a javascript error because of settings done in ajax manager. I am not sure of the exact error. but a scvript error occurs and it results in missing images!!!!

Thanks

NR
0
Yana
Telerik team
answered on 06 Sep 2010, 12:32 PM
Hello Narayanan,

Could you please isolate the issue in a simple page and send it to us? You should open a support ticket and attach it there. Thanks

Best wishes,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Jonathan Torres
Top achievements
Rank 1
Answers by
Yana
Telerik team
Narayanan
Top achievements
Rank 1
Share this question
or