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

RadPanelbar containing RadGridViews

5 Answers 157 Views
Panelbar (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Walter
Top achievements
Rank 1
Walter asked on 20 Aug 2008, 09:38 AM
In my app, i have an radpanelbar that is populated at runtime with multiple radpanelbargroupelements (variable number, depending on the user's role), where in each of those elements, there is a radgridview.

I want to give the user the possibility to choose his layout: outlook, explorer, list,toolbox.

I works fine in outlook and list style.

When choosing explorer style, i want each radpanelbargroupelement to expand and evenly fill the available space in the radpanelbar.

The expanding works, but i cannot set the height of the contentpanel to take up as much space to evenly fill the radpanelbar.
I can this be done?

walter

5 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 22 Aug 2008, 02:45 PM
Hello Walter,

Thank you for the question.

The designed behavior of the RadPanelBar's ExplorerBar style is to have its groups fully expanded according to the content in the content panels. In addition, a scrollbar for the whole RadPanelBar appears when needed. Unfortunately, this behavior cannot be altered at this time.

If you have additional questions, feel free to contact me.

Regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Walter
Top achievements
Rank 1
answered on 25 Aug 2008, 07:18 AM
Hi Nikolay,

so if i understand correctly, you cannot change the height of the content panel dynamically?

So my solution, to put a gridview inside it, is not really a good use for this control?

Is there any workaround possible to increase the height of the contentpanel at runtime to a height that is  the equal to (or bigger than) the height of my gridview?
0
Nikolay
Telerik team
answered on 27 Aug 2008, 07:27 AM
Hello Walter,

You have understood me correctly. Currently, you cannot change the Height of the content panel. However, the scenario of placing RadGridViews in RadPanelBar's ContentPanels is absolutely plausible. The content panels' Size is automatically calculated according to the content they contain. Let's assume that you have RadGridView with Height of 100 - the ContentPanel's Height will also be 100. The maximum Height of the ContentPanel is the Height of RadPanelBar itself. If you have RadPanelBar with Height of 150 and RadGridView with Height of 200 placed in a ContentPanel, the ContentPanel will be resized to a Size with Height of 150 and scrollbars will appear in order to enable you to scroll to the invisible area of RadGridView. If you want to change the Size of the grid at runtime, the ContentPanel will be resized automatically. However, in order to resize the RadPanelBarGroup area as well, please consider using the following workaround:
        private void radButton1_Click(object sender, EventArgs e)  
        {  
            this.radPanelBarGroupElement1.ContentPanel.MaximumSize = Size.Empty;  
            this.radPanelBarGroupElement1.ContentPanel.MinimumSize = Size.Empty;  
            grid.Size = new Size(200, 200);  
            this.radPanelBarGroupElement1.ContentPanel.MaximumSize = grid.Size;  
            this.radPanelBarGroupElement1.ContentPanel.MinimumSize = grid.Size;  
            this.radPanelBarGroupElement1.ContentPanel.MaximumSize = Size.Empty;  
            this.radPanelBarGroupElement1.ContentPanel.MinimumSize = Size.Empty;  
            this.radPanelBarGroupElement1.ContentPanel.MaximumSize = grid.Size;  
            this.radPanelBarGroupElement1.ContentPanel.MinimumSize = grid.Size;  
        } 

In the case above we change the Size of RadGridView from a former Size of (400, 400) to a Size of (200, 200).

If you have additional questions, feel free to contact me.

All the best,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Coty
Top achievements
Rank 1
answered on 08 Mar 2012, 04:55 PM
This thread is from 2008 but Is this still the case?   It seems to so because I cannot change the conetent panel's height dynamically. 

My problem is only certain information is shown inside the RadPageView.  So when I hide some items (like a panel) it creates a gap of blank space at the bottom of the RadPageView.  I then want to modify the Height of the RadPageView to remove that blank gap...

Let me know if anything has changed in this regard,  Thanks,

Coty
0
Nikolay
Telerik team
answered on 13 Mar 2012, 02:05 PM
Hi Coty,

This thread concerns the process of changing the height of the content panels of RadPanelBarGroupElements (for RadPanelBar) or, if we should speak in the context of the RadPageView control - the height of the RadPageViewPage. Please note, however, that the thread does not imply changing the height of the whole RadPageView control. This control is not designed to autosize itself according to the content.

Still, regarding the issue discussed in this thread, you can change the height of RadPageViewPages by setting their PageLength property, for example:

this.radPageViewPage3.PageLength = 200;

Let us know if you have additional questions.

Greetings,
Nikolay
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
Panelbar (obsolete as of Q2 2010)
Asked by
Walter
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Walter
Top achievements
Rank 1
Coty
Top achievements
Rank 1
Share this question
or