GridView with full width

9 posts, 1 answers
  1. André
    André avatar
    5 posts
    Member since:
    Jul 2008

    Posted 06 Oct 2011 Link to this post

    I'm trying to put on a RadForm a RadCommandBar and below it a RadGridView. 

    The problem is that my application will run on Maximized window state, but I can't make the Grid and the CommandBar to be with full width automatically. 

    I set both to "Dock on parent container" but then the Grid is set over the Bar. And, I've also tried other configurations, but nothing worked. Just the "Dock..." thing worked to accomplhish the width, but it messed with the layout.

    So, how can I easily accomplish that? To have a CommandBar and below a GridView, both with full width and without one be over the other? What am I missing? I can't believe that it's so difficult to do that! :-)

    Thanks!

  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 06 Oct 2011 Link to this post

    Hello,

    It's not, you just put them in the wrong order in the Controls collection of the form.

    Just go into designer.cs and reverse the order the controls are added and then dock them both.

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga

    Telerik WinForms MVP
  3. UI for WinForms is Visual Studio 2017 Ready
  4. André
    André avatar
    5 posts
    Member since:
    Jul 2008

    Posted 06 Oct 2011 Link to this post

    Hi Emanuel!

    Which should I add first? The Grid or the CommandBar?

    Thanks!!
  5. André
    André avatar
    5 posts
    Member since:
    Jul 2008

    Posted 06 Oct 2011 Link to this post

    Hi Emanuel!

    I added the Bar and set dock to parent. Then I added the Grid and set dock to parent. But, the same thing happened. When I set the Grid to be docked, it became over the CommandBar and then I couldn't see this CommandBar anymore.

    And I've also tried to change the order is designer.cs but it didn't work.
  6. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 07 Oct 2011 Link to this post

    Hello again,

    Please, set the command bar dock to TOP, and the GridView Dock to FILL.

    Hope this helps, if you have any other questions or comments, please let me know,


    Best Regards,
    Emanuel Varga


    Telerik WinForms MVP
  7. Lord
    Lord avatar
    4 posts
    Member since:
    Feb 2013

    Posted 18 Feb 2013 Link to this post

    Hi all, I'm have the same problem. I'm working with Vb .NET

    First, I put a CommandBar win Dock - Top, then, i put a Grid and I set the Dock property to Fill, but the top of the Grid is hidden under the CommandBar. Is the same if first I put a CommandBar and then a PageView or a Split Container.

    :/

    Thanks.
  8. Answer
    Lextendo
    Lextendo avatar
    12 posts
    Member since:
    Feb 2010

    Posted 20 Feb 2013 Link to this post

    André and Lord,

    You should take a look at the visual studio document outline window. It provides an easy way to rearrange (the order of) your controls without the need to edit the designer code behind.

    You can google it, or take a look here.

    Lex
     
  9. Plamen
    Admin
    Plamen avatar
    132 posts

    Posted 21 Feb 2013 Link to this post

    Hi guys,

    Thank you for wring.

    I can confirm that the Lextendo approach is the right way to go in this case.  Here is another KB article regarding this matter: http://www.telerik.com/support/kb/winforms/general/docking-controls-on-a-form-in-a-windows-forms-application.aspx.

    @Lextendo - Thank you for your community effort. Your Telerik Points have been updated for your time and efforts. 

    I hope this helps.

    Regards,
    Plamen
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  10. Lord
    Lord avatar
    4 posts
    Member since:
    Feb 2013

    Posted 21 Feb 2013 Link to this post

    Thanks a lot! Rearrange control are the right way, as Plamen said   :D

Back to Top
UI for WinForms is Visual Studio 2017 Ready