RadPanelbar containing RadGridViews

6 posts, 0 answers
  1. Walter
    Walter avatar
    5 posts
    Member since:
    Jul 2008

    Posted 20 Aug 2008 Link to this post

    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
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 22 Aug 2008 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Walter
    Walter avatar
    5 posts
    Member since:
    Jul 2008

    Posted 25 Aug 2008 Link to this post

    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?
  5. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 27 Aug 2008 Link to this post

    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.
  6. Coty
    Coty avatar
    90 posts
    Member since:
    Aug 2006

    Posted 08 Mar 2012 Link to this post

    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
  7. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 13 Mar 2012 Link to this post

    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 >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready