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

[Solved] Expanded Image URL Not Showing Up

1 Answer 168 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 30 Jan 2010, 12:50 AM
I expand a node with the expandMode = TreeNodeExpandMode.WebService and it expands just fine, but the expandedImageURL doesn't change.

If I build out the tree as to not need the webserice, the expandedimageurl works properly.  Am I doing something wrong or is this a bug?


RadTreeNode childNode = new RadTreeNode();
childNode.Text ="TITLE";
childNode.ImageUrl = "/images/theme1/closedfolder.gif";
childNode.ExpandedImageUrl = "/images/theme1/openfolder.gif";
childNode.ExpandMode = TreeNodeExpandMode.WebService;


1 Answer, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 04 Feb 2010, 09:08 AM
Hello John,

Thank you for contacting us.

It seems there is a problem with our control in this exact scenario.
Here is a workaround that you can use - hook to the OnClientNodePopulated event to make the image to update.

<script type="text/javascript">
        function populated(sender, eventArgs) {
            var node = eventArgs.get_node();
            node._updateImageUrl();      
    }
    </script>
<telerik:RadTreeView ID="RadTreeView1" Runat="server" Skin="Vista" OnClientNodePopulated="populated">

You can see the full example in the attached .zip file.

Regards,
Veronica
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
TreeView
Asked by
John
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Share this question
or