We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TtreeView with imageUrl doesn't seem to work properly.

Thread ID:





118157 Feb 5,2015 09:56 PM UTC Feb 6,2015 07:19 AM UTC JavaScript 1
Tags: ejTreeView
Asked On February 5, 2015 09:56 PM UTC

I'm trying to create a treeview as result of a json request, but the treeview does not loads the images.

Assuming that:

data=[{"Id":"G_3","PId":"","Name":"test","HasChild":false,"IsExpanded":false,"IsGroup":true, "Order":0,"imageUrl":"/content/img/folder.png"}]       

$.post(mViewPage.baseUrl + '/treeview/mapview/' + cod).done(function (data) {
                showCheckbox: true,
                fields: {
                    id: "Id", parentId: "PId", text: "Name", hasChild: "HasChild", dataSource: data, imageUrl: "imageUrl"

Everything seems to work until certain point, the images are even downloaded from the server.
I've traced the problem to the following code in ej.treeview.js, when the _updateElement is called the node (liElement) has as innerHtml somthing like: <img src.../><a rel='nofollow' href="..." >test</a>
But as you can see in the below code this is remove in the first if...else...

  _updateElement: function (liElement, subItem) {
            var outerdiv, exCollpasediv, linkElement, spanTag ;
            if (liElement.firstChild.nodeName == 'SPAN') {
                spanTag = liElement.firstChild;
                linkElement = liElement.lastChild;
                linkElement = liElement.lastChild; //it's removed here

Is this some sort of bug or am I missing something?


Harikrishnan P [Syncfusion]
Replied On February 6, 2015 07:19 AM UTC

Hi Rui,

We were able to reproduce the problem and we considered this issue “Treeview with imageUrl doesn’t seem to work” as bug, also have logged a report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates.


Please let me know if you have any questions.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon