htmlAttribute raises error in _setAttributes
I'm trying to create a treeview as result of a json request, but the treeview fails to set the HtmlAttributes.
Assuming that:
data= [{Id:"G_3",PId:"",Name:"test",HasChild:true,IsExpanded:false,IsGroup:true,Order:0,ImageUrl:"/content/img/folder.png",ElementId:3,HtmlAttributes:null},{Id:"L_2",PId:"G_3",Name:"test1",HasChild:false,IsExpanded:false,IsGroup:false,Order:0,ImageUrl:"",ElementId:2,HtmlAttributes:{"data-elementid":"2"}},{Id:"L_3",PId:"G_3",Name:"test3",HasChild:false,IsExpanded:false,IsGroup:false,Order:0,ImageUrl:"",ElementId:3,HtmlAttributes:{"data-elementid":"3"}}]
$.post(mViewPage.baseUrl + '/treeview/mapview/' + cod).done(function (data) {
$("#mtreeview").ejTreeView({
showCheckbox: true,
fields: {
id: "Id", parentId: "PId", text: "Name", hasChild: "HasChild", dataSource: data, imageUrl: "imageUrl",htmlAttribute: "HtmlAttributes"
}
});
});
I've traced the problem to the following code in ej.treeview.js, when the _setAttributes is called, the element.attr is undefined
_setAttributes: function(data, element) {
for (var key in data) {
element.attr(key, data[key]); //element.attr is undefined
}
},
Is this some sort of bug or am I missing something?
Thanks
Hi Rui,
Thanks for using Syncfusion products.
We would like to let you know that, “Treeview fails to set the HtmlAttributes” is a known issue and it has been fixed in our latest service pack release (12.4.0.30). We would like you to upgrade to latest version and it can be downloaded from the following link:
For your convenience we have prepared the sample, please download the sample from the following location.
Sample Location: Sample
Please let us know if you have further concern.
Regards,
Saranya.S
I'm having a lot of issues with the controls and would be very helpful if I could see the not minified sources.
Hi Rui,
As per our support guidelines; through forums widely we offer only limited and basic assistance.
Since you have requested for non-minified version of the JS files, it is beyond our support limit consigned for a forum.
A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Regards,
Saranya.S
Hi Rui,
Thanks for your update.
Please let us know if you have further concern.
Regards,
Saranya.S
- 6 Replies
- 2 Participants
-
RL RL
- Feb 5, 2015 11:57 PM UTC
- Feb 10, 2015 06:37 AM UTC