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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -