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. Image for the cookie policy date
close icon

TtreeView with imageUrl doesn't seem to work properly.

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?


1 Reply

HP Harikrishnan P Syncfusion Team 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.



Live Chat Icon For mobile
Up arrow icon