Hello everybody!!
Is there any way for to set the same indentation for nodes with childs and nodes without childs?
thanks in advance!!
Hello,
Technically the treeview does not have anything built-in to support this scenario, but I think a workaround is possible. You can use HTML directly in node text and have span with negative margin, this will visually do the same. Example:
<ignav:UltraWebTree ID="UltraWebTree1" runat="server" DefaultImage="" HiliteClass="" HoverClass="" Indentation="20"> <Levels> <ignav:Level Index="0" /> </Levels> <Nodes> <ignav:Node Text="Root Node"> </ignav:Node> <ignav:Node Text="Root Node"> </ignav:Node> <ignav:Node Text="Root Node"> <Nodes> <ignav:Node Text="Child Node"> </ignav:Node> <ignav:Node Text="<span style='margin-left:-15px'>Child Node</span>"> </ignav:Node> <ignav:Node Text="Child Node"> </ignav:Node> </Nodes> </ignav:Node> </Nodes> </ignav:UltraWebTree>
ok it works well,
but when i can't do it for image, if the nodes have and image, the text will follow according to the span but the image don't, any suggestions???
Oh, sorry for that, it seems that directly injecting HTML may have adverse effect on some functionality of the tree.
The good news is that I discover the official alternative :) Which is much easier and cleaner to implement, and works fine with NodeClick.
<ignav:node Text="Child Node"> <Margin Left="-15px" /></ignav:Node>
Hope this helps.