Removing a TabPane from Sliding Zone

2 posts, 0 answers
  1. Ron Orbas
    Ron Orbas avatar
    2 posts
    Member since:
    Feb 2009

    Posted 18 Mar 2009 Link to this post

    Hi there,

    I wanted to delete a pane from sliding zone but I didn't see any functionality that lets you directly do this
    on the client side (javascript). There is a  HideTab() method in the sliding pane but this doesn't really help
    my cause because I have to make sure the pane is deleted. Can somebody show me how to appropriately
    delete a pane from sliding zone on Client side? This is the closest i got to deleting a tab pane:

    function deleteTab(TabName)



        var slidingZone = $find("<%= TreeSlidingZoneLeft.ClientID %>");


        var slidingPane = FindTabPaneByTitle(TabName);





        if(slidingPane != null)  





            ArrayRemove(slidingZone._slidingPanes, index);








    function ArrayRemove(array, from, to) { 


        var rest = array.slice((to || from) + 1 || array.length);



         array.length = from < 0 ? array.length + from : from;


       return array.push.apply(array, rest);





    function FindTabPaneByTitle(TabName)



        var slidingPanes = getPanes();




        var slidingPane = null;




        for (var i = 0; i < slidingPanes.length; i++)


            container = slidingPanes[i].GetTabContainer();



            if(container.title.toLowerCase() == TabName.toLowerCase())


                index = i;


                slidingPane = slidingPanes[i];








        return slidingPane;




    function getPanes()



        var slidingZone = $find("<%= TreeSlidingZoneLeft.ClientID %>");




        return slidingZone.getPanes();











  2. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 20 Mar 2009 Link to this post

    Hi James,
    In the scenario you describe, you can refer to the RadSlidingPane as to a standard ASP.NET control and you can do with it everything that you can do with an ASP Label control for example. Unfortunately, as you yourself probably assume, you cannot remove an ASP Label control from the Controls collection of your page with client code. That is why you cannot do this with a RadSlidingPane as well.

    The only thing that I can suggest in your case is that you make an AJAX request and remove the RadSlidingPane from the Items collection of the RadSlidingZone on the server.

    All the best,
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top