Page 1 of 1

Assign node icon at runtime

PostPosted: 23 Dec 2015 16:32
by Davide
Hello,

is it possible on JQDynaTree assign the node icon by code ?
I mean assign node icon in GetRooNodes or GetChildrenNodes functions to choose at runtime which icon show for each node.

Thank you,
Davide

Re: Assign node icon at runtime

PostPosted: 29 Dec 2015 12:24
by Alexander Bulei
Hi Davide,

it possible, but only via css class.
Basically, you need pass your custom css class in addClass, then you need define the css rules to that class, which will control the icon.

Best Regards.

Re: Assign node icon at runtime

PostPosted: 11 Mar 2016 18:25
by Vanya
I managed to change icons on runtime by setting Dynatree imagepath and then setting JSonObj.S['icon'] to the file name.