Hi,
We are switching from a Telerik Treeview to a TreeList in our application.
In the treeview, we also did on-demand loading, there we could catch the OnNodeDataBound event, and if we see that there are no child items for that node, we could hide the expand button. So the user would only see the "+" in front of the nodes that actually have children (even though the children are not sent to the client yet).
I attempted to do the same with the TreeList in the "ItemDataBound" event, but then I got the error that I cannot set the value of the item.CanExpand property. The best I could find is the "HideExpandCollapseButtonIfNoChildren" property, but then the user will still see the "+" in front of all items, and have to click it first to find out that there are no child items, which is not very user friendly.
Is this possible with the treelist? If yes, how?
Kind regards,
Kristof
We are switching from a Telerik Treeview to a TreeList in our application.
In the treeview, we also did on-demand loading, there we could catch the OnNodeDataBound event, and if we see that there are no child items for that node, we could hide the expand button. So the user would only see the "+" in front of the nodes that actually have children (even though the children are not sent to the client yet).
I attempted to do the same with the TreeList in the "ItemDataBound" event, but then I got the error that I cannot set the value of the item.CanExpand property. The best I could find is the "HideExpandCollapseButtonIfNoChildren" property, but then the user will still see the "+" in front of all items, and have to click it first to find out that there are no child items, which is not very user friendly.
Is this possible with the treelist? If yes, how?
Kind regards,
Kristof