asp.net - asp:treeView hiding the /- button? -


i have treeview in app i'm making. changed parent nodes expand when clicked using selectaction propery, i'd remove +/- expansion button. tried setting navtree.showexpandcollapse = false; disabled expansion ability of parent nodes.

does how remove +/- button without messing node's select action event?

thanks

here's cs

    protected void page_load(object sender, eventargs e)     {         service1 myservice = new service1();         //  //populate site menu         gridview sites = new gridview();           sites.datasource = myservice.getallsites();         sites.databind();           foreach (gridviewrow siterow in sites.rows) {             treenode parentnode = new treenode(siterow.cells[1].text);             parentnode.selectaction = treenodeselectaction.expand;             parentnode.collapse();             navtree.nodes.add(parentnode);               treenode childnode = new treenode(siterow.cells[2].text);             childnode.navigateurl = "http://ign.com";             parentnode.childnodes.add(childnode);          }        } 

here's aspx file

            <asp:treeview id="navtree" runat="server" nodeindent="0" >                   <nodes>                 <asp:treenode value="parent1" expanded="true" text="1">                 <asp:treenode value="child1a" text="a" />                 <asp:treenode value="child1b" text="b" />                 </asp:treenode>                 <asp:treenode value="parent2" text="2">                 </asp:treenode>                 <asp:treenode value="parent3" expanded="true" text="3">                 <asp:treenode value="child3a" text="a">                 </asp:treenode>                 </asp:treenode>                          </nodes>                      </asp:treeview>          </div> 

css solution:

<style> #treeview1 table td img {     display:none!important;     } </style> 

where treeview1 id of tree. image still there, not visible.

jquery solution:

<script>     $(function () {         $("#<%=treeview1.clientid %> table td img").hide();     }); </script> 

this removes image dom.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -