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

GridView with full width

8 Answers 265 Views
GridView
This is a migrated thread and some comments may be shown as answers.
André
Top achievements
Rank 1
André asked on 06 Oct 2011, 12:37 PM
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!

8 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 06 Oct 2011, 12:49 PM
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
0
André
Top achievements
Rank 1
answered on 06 Oct 2011, 05:09 PM
Hi Emanuel!

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

Thanks!!
0
André
Top achievements
Rank 1
answered on 06 Oct 2011, 05:54 PM
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.
0
Emanuel Varga
Top achievements
Rank 1
answered on 07 Oct 2011, 06:31 AM
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
0
Lord
Top achievements
Rank 1
answered on 18 Feb 2013, 05:52 PM
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.
0
Accepted
Lextendo
Top achievements
Rank 1
answered on 20 Feb 2013, 10:13 PM
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
 
0
Plamen
Telerik team
answered on 21 Feb 2013, 02:46 PM
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.
0
Lord
Top achievements
Rank 1
answered on 21 Feb 2013, 02:57 PM
Thanks a lot! Rearrange control are the right way, as Plamen said   :D

Tags
GridView
Asked by
André
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
André
Top achievements
Rank 1
Lord
Top achievements
Rank 1
Lextendo
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or