This is a migrated thread and some comments may be shown as answers.

Programmtically set Panel to be Expanded

5 Answers 69 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Nathan J Pledger
Top achievements
Rank 2
Nathan J Pledger asked on 18 Feb 2009, 10:31 AM
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

5 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 18 Feb 2009, 03:07 PM
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.
0
Nathan J Pledger
Top achievements
Rank 2
answered on 18 Feb 2009, 03:53 PM
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.
0
Svetlina Anati
Telerik team
answered on 20 Feb 2009, 04:00 PM
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.
0
Nathan J Pledger
Top achievements
Rank 2
answered on 20 Feb 2009, 04:18 PM
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.

0
Svetlina Anati
Telerik team
answered on 23 Feb 2009, 10:02 AM
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.
Tags
Splitter
Asked by
Nathan J Pledger
Top achievements
Rank 2
Answers by
Svetlina Anati
Telerik team
Nathan J Pledger
Top achievements
Rank 2
Share this question
or