Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a node template for treeview?

I want to add a link beside the node text in treeview. like the following figure:

enter image description here

After some googling, I found that there's no NodeTemplate in the treeview and creating the node text manually like this sample is the only way.

The only problem I have is that the built-in selection functionality isn't worked anymore, because the internal javascript select function isn't called.

Any idea about a workarround or another way to implement my goal?

like image 485
French Boy Avatar asked Nov 14 '22 18:11

French Boy


1 Answers

Have you tried RenderPostText? http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treenode.renderposttext.aspx

http://kb.cnblogs.com/a/1379715/

like image 122
BCartolo Avatar answered Dec 06 '22 06:12

BCartolo