Programmtically set Panel to be Expanded

6 posts, 0 answers
  1. Nathan J Pledger
    Nathan J Pledger avatar
    95 posts
    Member since:
    Apr 2006

    Posted 18 Feb 2009 Link to this post

    Hi,

    I am programmatically constructing my Splitter layout. It's all working great, but I can't figure out how to expand the panel on creation.

    I am loading the settings from an XML file. The following is what I think is the relevant snippet:

                            // create a tab panel 
                RadPane radTabContainerPane = new RadPane(); 
                radTabContainerPane.Width = new Unit(22, UnitType.Pixel); 
                radTabContainerPane.Scrolling = SplitterPaneScrolling.None; 
                radTabContainerPane.MinWidth = 22; 
     
                // create a sliding zone 
                RadSlidingZone radSlidingZone = new RadSlidingZone(); 
                radSlidingZone.Width = new Unit(22, UnitType.Pixel); 
                radSlidingZone.SlideDirection = direction; 
                radSlidingZone.ClickToOpen = true
                 
                            // populate children 
                XmlNodeList paneXmlNodes = parentPaneXmlNode.SelectNodes("Pane"); 
                foreach (XmlNode paneXmlNode in paneXmlNodes) 
                { 
                    RadSlidingPane radPane = new RadSlidingPane(); 
                    radPane = (RadSlidingPane)PopulateRadPaneFromPaneXmlNode(radPane, paneXmlNode,parentRadSplitter.Orientation); 
                                    // ??? HOW TO SET PANE AS EXPANDED ??? 
                    radSlidingZone.Items.Add(radPane); 
                } 
     
                radTabContainerPane.Controls.Add(radSlidingZone); 
     
                parentRadSplitter.Items.Add(radTabContainerPane); 

    It seems that the "Expanded" property is the only thing missing from your API, I must be missing something.

    Many thanks

  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 18 Feb 2009 Link to this post

    Hello Nathan,

    The RadPane does not offer a property called "Expanded" but it offers a similar property called Collapsed which is used to control the pane's expansion. This being said, you can expand a RadPane dynamically on the server by setting Collapsed = false.


    Greetings,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nathan J Pledger
    Nathan J Pledger avatar
    95 posts
    Member since:
    Apr 2006

    Posted 18 Feb 2009 Link to this post

    Hello (again) Svetlina,

    Sorry, perhaps I didn't make myself clear. I was looking for a property to be on the RadSlidingPane object. So maybe a property such as "IsPinned", ie it has been expanded and pinned. I would need this both to get client state and restore client state on subsequent loads of the page.

    I've prepared a screenshot to illustrate:


    Thanks very much.
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 20 Feb 2009 Link to this post

    Hi Nathan,

    In order to dock/expand, etc a RadSlidingPane you should use its RadSlidingZone's methods, e.g:

     protected void Button2_Click(object sender, EventArgs e)  
        {  
            zone.DockedPaneId = RadSlidingPane1.ClientID;  
        } 



    Best wishes,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Nathan J Pledger
    Nathan J Pledger avatar
    95 posts
    Member since:
    Apr 2006

    Posted 20 Feb 2009 Link to this post

    Thanks Svetlina,

    That makes sense, actually. I'll have to wait till Monday to try it though 'cos my code is in small pieces on the floor right now. I'm sure it works.

    Thanks for your help.

  7. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 23 Feb 2009 Link to this post

    Hi Nathan ,

    I hope that the provided solution is what you need but in case you need further assistance or in case you have additional questions, do not hesitate to contact us again.


    Regards,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017