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

DockWindow size equal to child form with a GridView

1 Answer 112 Views
GridView
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 13 Apr 2015, 05:13 PM

Hi,

I am using raddock control to host dock windows that as a child have a form with a docked gridview, as per picure attached.

 

My aim is to have the dockwindow width equal to the gridview hosted inside the form. I can achieve this the first time the dock window is created, but if the user changes the width of a column in the gridview I cannot figure out how to programmatically change the parent form's width to be equal to the gridview width, and subsequently the dockwindow width to be equal to the hosting the gridview form width.

The second picture attached displays the desired effect, the form having the same width as the gridview, and also the dockwindow hosting the has a similar width.

I would appreciate your input,

 

Regards,

 

George

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 16 Apr 2015, 11:20 AM
Hello George,

Thank you for writing.

Following the provided information I have prepared a sample project where the RadDock is used an MDI container. In the child form there is a RadGridView bound to the Northwind.Categories table. In order the grid to fill the entire form's size, you should set the RadGridView.Dock property to DockStyle.Fill. Additionally, in order the columns to be spread over the whole grid, you can set the RadGridView.AutoSizeColumnsMode property to GridViewAutoSizeColumnsMode.Fill. Please refer to the attached gif file illustrating the behavior on my end. 

If it does not suit your requirement, it would be greatly appreciated if you can provide additional information about the exact requirement that you are trying to achieve. Thank you.

I hope this information helps. Should you have further questions, I would be glad to help.
 
Regards,
Dess
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GridView
Asked by
George
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or