I have a remote data source (rds) that will deliver the tree view nodes items.
Elsewhere on the page there will be check boxes to allow the subtrees of various campaigns to be turned on and off.
The treeview template setting appears to only affect the 'k-in' span of a 'treeitem' li as rendered by the treeview control.
My situations is that the rds will supply additional item data about the nature of the item
{ id: ..., hasChildren: true, data:{addClass:'Campaign1'} }
I want the data.addClass value added to the class of the containing <li> that will be rendered.
The outcome desired looks like
<li role="treeitem" class="k-item ... Campaign1" data-uid="..." id="...">
<div class="k-top/mid/bot"
<span class="k-icon ..." role="presentation"></span>
<span class="k-in"> TEMPLATE RENDERING GOES HERE </span>
</div>
</li>
Is there a way some javascript in the template setting can perform the desired tweak on the <li>?
Will I need to handle a 'children-loaded' event and iterate over the freshly rendered nodes ?
Elsewhere on the page there will be check boxes to allow the subtrees of various campaigns to be turned on and off.
The treeview template setting appears to only affect the 'k-in' span of a 'treeitem' li as rendered by the treeview control.
My situations is that the rds will supply additional item data about the nature of the item
{ id: ..., hasChildren: true, data:{addClass:'Campaign1'} }
I want the data.addClass value added to the class of the containing <li> that will be rendered.
The outcome desired looks like
<li role="treeitem" class="k-item ... Campaign1" data-uid="..." id="...">
<div class="k-top/mid/bot"
<span class="k-icon ..." role="presentation"></span>
<span class="k-in"> TEMPLATE RENDERING GOES HERE </span>
</div>
</li>
Is there a way some javascript in the template setting can perform the desired tweak on the <li>?
Will I need to handle a 'children-loaded' event and iterate over the freshly rendered nodes ?