telerik:RadSplitter collapse using a button click

7 posts, 0 answers
  1. Jayavidya
    Jayavidya avatar
    14 posts
    Member since:
    Oct 2010

    Posted 06 Dec 2010 Link to this post

     

     

    Hi
    I have a radsplitter and I am trying to collapse it on a button click. OnClientClick of the button, I have this method called.
    function OnCollapse()
    {var
    splitter = "<%= RadSplitter1.ClientID %>";
    var pane = "<%= radPaneAdminLeftMenu.ClientID %>"
    pane.Collapse();
    return false;
    }
    It says pane.Collapse() is not supported.

    Microsoft JScript runtime error: Object doesn't support this property or method

    Please advice.
    Thanks.

     

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 06 Dec 2010 Link to this post

    Hello,


    Use the method collapse() ; (You need to careful, because javascript is case sensitive).
    More info: RadPane Client Object



    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jayavidya
    Jayavidya avatar
    14 posts
    Member since:
    Oct 2010

    Posted 06 Dec 2010 Link to this post

    Hello Shinu,
    Thanks for the prompt response. I did try uppercase lower case. It didnot support. getPaneById method also is not supported.. I didnt know wat was wrong

    splitter.getPaneById(

     

    "radPaneAdminLeftMenu.ClientID");

     

    pane.collapse()

  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 06 Dec 2010 Link to this post

    Hi Jayavidya,

    If you are using RadSplitter for ASP.NET AJAX you need to use the $find() method of the MS AJAX Framework in order to get reference to RadSplitter's client-side object, e.g.:
    var splitter = $find("<%= RadSplitter1.ClientID %>");

    Could you please verify which version of RadSplitter you are using?

    All the best,
    Dobromir
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. Jayavidya
    Jayavidya avatar
    14 posts
    Member since:
    Oct 2010

    Posted 07 Dec 2010 Link to this post

    Hello Team,
    My version is 2010.1.415.40. I just tried adding ajax manager again and tried the same. It works fine. Thanks for all ur support. I am sharing my code here.
    function resizeWindow() {
      
            var splitter = $find("<%= radSplitterAdministration.ClientID %>");
            var pane = $find("<%= radPaneAdminLeftMenu.ClientID %>");
      
            var paneObj = splitter.getPaneById(pane.get_id());
            if (paneObj.get_collapsed())
                paneObj.expand();
            else
                pane.collapse();
            return false;
      
        }
    Thanks,
    JJ.
  7. Onkaramurthy
    Onkaramurthy avatar
    8 posts
    Member since:
    Dec 2013

    Posted 30 Sep 2014 Link to this post

    Hi 

    Any one can help me to get the Radpane Id of RadSplitter ?

    I am using below mentioned piece of code But i am getting this Error :- Microsoft JScript runtime error: Object doesn't support property or method 'getPaneById'

    var splitter = "<%=RadsplitterGrid.ClientID %>";
    var TopLeftPane = splitter.getPaneById('<%= LeftTopPane.ClientID %>');
    TopLeftPane.set_height(height);

    Thanks
    Onkar,





  8. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 02 Oct 2014 Link to this post

    Hi,

    You need to pass the id of the Splitter to the $find() method of the MS AJAX Framework in order to get reference to control's client-side object, e.g.:
    var splitter = $find("<%= RadsplitterGrid.ClientID %>");

    I will
    also advice that you review the following MSDN article: Sys.Application $find Method

    Regards,
    Vessy
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017