How to hide expander +/- icon on radTreeView?

7 posts, 1 answers
  1. David
    David avatar
    48 posts
    Member since:
    Nov 2012

    Posted 04 Dec 2012 Link to this post

    Hi, can I hide the expander on an ASP.NET radTreeView node?  I'm expanding the entire list upon load with checkboxes and don't want the users to expand/collapse since they are selecting search criteria. 

    Thanks, Dave.
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Dec 2012 Link to this post

    Hi David,

    Try overriding the default CSS as follows to achieve your scenario.

    CSS:
    <style type="text/css">
        .RadTreeView_Default .rtPlus, .RadTreeView_Default .rtMinus
        {
            display: none !important;
        }
    </style>

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aravind
    Aravind avatar
    9 posts
    Member since:
    Oct 2012

    Posted 27 Apr 2013 Link to this post

    hai
      I am new to radtreeview,i need to hide "+" symbol and enable checkboxes,and if i click parent checkbox it expand all its child node,if i again uncheck the checkbox it collapse in client side (Javascript),pls send some coding part.


    Regards
      Aravind
  5. Aravind
    Aravind avatar
    9 posts
    Member since:
    Oct 2012

    Posted 28 Apr 2013 Link to this post

    Hai
      Here i attach the screenshots for radtreeview without "+" or "-" symbol and also left side line (mention in 1st attachment).What i need is mention in 2nd attachment.i use the following css
    <style type="text/css">
        .RadTreeView_Default .rtPlus, .RadTreeView_Default .rtMinus
        {
            display: none !important;
        }
    </style>
    but it give leftside like mention in 1st attachment,pls see and reply me asap.
    And also i need to check and uncheck the checkbox based on if condition in javascript.
    client side code is    
    function onClientNodeClickedHandler(sender, eventArgs) {
                     var node = eventArgs.get_node();
                      }

                               node.set_selected(false);
                               eventArgs._node.checked = false;
                               node.set_checked = false;
                               eventArgs._node._properties._checked = false;
                              nodetext.checked = ture;
                              node.get_checked() = ture
    the above 6 lines are check and unchecked the child node but not work pls reply me.why i ask for unchecked is i have to count the checked node,if count is greater than 10 it automaticall uncheck the lastly checked node.i have done count the checked node and if the the count is greater than 10 it goes to else part,in else part i want to uncheck the lastly checked node.
    here my code is
     var hdFldLang = document.getElementById("ctl00_ContentPlaceHolder1_hdLangCount").value;
                        if (hdFldLang > 20) {
          node.set_selected(false);
                               eventArgs._node.checked = false;
                               node.set_checked = false;
                               eventArgs._node._properties._checked = false;
                              nodetext.checked = ture;
                              node.get_checked() = ture


    }
    else
    {}



    Thanx
     Aravind
  6. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Apr 2013 Link to this post

    Hi,

    I suppose you want to check child nodes on checking parent node. Here is the sample code.
    aspx:
    <telerik:RadTreeView ID="RadTreeView1" CheckBoxes="true" TriStateCheckBoxes="true" CheckChildNodes="true"  runat="server">
    </telerik:RadTreeView>

    Thanks,
    Shinu
  7. Aravind
    Aravind avatar
    9 posts
    Member since:
    Oct 2012

    Posted 30 Apr 2013 Link to this post

    hai Shinu
        Thank you for ur reply 
    <telerik:RadTreeView ID="RadTreeView1" CheckBoxes="true" TriStateCheckBoxes="true" CheckChildNodes="true"  runat="server">
    </telerik:RadTreeView>
              checking parent node is used for expand and collapse and not for check and uncheck the all child nodes,my need is without
     "+" and "-" symbol only need checkboxes to expand and collaspes the parent node,screenshots poseted in previous question,and checked
    count is above 10 it uncheck the lastly checked child node.(that means if u checked 10 nodes  and now got to check 11th one it show the
    messagebox and unchek the 11th then only cheked count is 10).i am finish count the checked node just i need uncheck the node is count 
    greater than 10.

    Regards,
     Aravind


  8. Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 02 May 2013 Link to this post

    Hello Aravind,

     
    You can achieve such custom functionality by using expand() or toggle() of RadTreeNode Client Object and checking the checked child nodes count as in the GetNodes() sample function in the same help article.

    Hope this will be helpful.

    All the best,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017