c# - Treeview adding controls to outputted Root node -


i working on project required add button root node of treeview control, looks

enter image description here

currently achieve following in node.text property

treenode.text = string.format("<span style=\"width: 220px; display: inline-block;\">{0}</span> <input type=\"button\" value=\"go\" onclick=\"treerootgobuttononclick('" + tree + "','" + treenode.value + "','" + treenode.text + "')\" style=\"display:none; height: 20px; float:right;\" />", treenode.text); 

this works desired in ie not in chrome or other browser firing event anchor tag button sitting in, below

<td class="treeview_rootnode treeview_node" style="white-space:nowrap;">     <a class="treeview_rootnode treeview_node" href="javascript:__dopostback('ctl00$uxmastercontentplaceholder$uxtreeviewcollaspsiblepanel$ctl00$uxtreeview','scl^pa')" id="uxmastercontentplaceholder_uxtreeviewcollaspsiblepanel_ctl00_uxtreeviewt0" style="text-decoration:none;border-style:none;"><span style="width: 220px; display: inline-block;">clients</span> <input type="button" value="go" onclick="treerootgobuttononclick('value1','value2','value3')" style="display:inline-block; height: 20px; float:right;"></a> </td> 

what want achieve following, can add button within td tag instead of within anchor tag

<td class="treeview_rootnode treeview_node" style="white-space:nowrap;">     <a class="treeview_rootnode treeview_node" href="javascript:__dopostback('ctl00$uxmastercontentplaceholder$uxtreeviewcollaspsiblepanel$ctl00$uxtreeview','scl^pa')" id="uxmastercontentplaceholder_uxtreeviewcollaspsiblepanel_ctl00_uxtreeviewt0" style="text-decoration:none;border-style:none;"><span style="width: 220px; display: inline-block;">clients</span> </a>     <input type="button" value="go" onclick="treerootgobuttononclick('value1','value2','value3')" style="display:inline-block; height: 20px;"> </td> 

any appreciated have tried googling found nothing of far.


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -