Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > resize the datagrids?
 

resize the datagrids?

I have two datagrids on a form. Sometimes the top one contains for rows, sometimes the bottom one. Is there a way that the user can grab the bottom of the top datagrid and move it up so that it becomes a smaller window, then grab the top of the bottom datagrid and slide it up so it becomes a larger window?
Thanks
Steveinbeloit  Wednesday, August 23, 2006 2:40 PM

If you're using .NET 2.0, the SplitContainer would be the right tool for the job.Put it on the form, set its Dock property to Fillan Orientation property to Horizontal. Put the first grid in the upper panel and secondgrid in lower one. Set both grid's Dock panel to Fill.

If you're using .NET 1.x, the Splitter control will help you achieve a similar solution. Just dock it between both grids.

Andrej

Andrej Tozon  Wednesday, August 23, 2006 2:49 PM

If you're using .NET 2.0, the SplitContainer would be the right tool for the job.Put it on the form, set its Dock property to Fillan Orientation property to Horizontal. Put the first grid in the upper panel and secondgrid in lower one. Set both grid's Dock panel to Fill.

If you're using .NET 1.x, the Splitter control will help you achieve a similar solution. Just dock it between both grids.

Andrej

Andrej Tozon  Wednesday, August 23, 2006 2:49 PM
I am using VS 2003, so 1.1, datagrids, not datagridview.

I have not heard of the Splitter, I will look into it.
Steveinbeloit  Wednesday, August 23, 2006 2:51 PM

I believe you'll find enough information on Splitter control on MSDN to get you started...

Andrej

Andrej Tozon  Wednesday, August 23, 2006 2:56 PM

You can use google to search for other answers

Custom Search

More Threads

• How to add new items in combobox in DataGridView
• How to create and implement a EXPLORER FORM in VB 2005
• Transaction, Row State after insert with RaiseError raised in the Child Table.
• Binding a Business Object to a User Control - problem
• Disappearing Tab Controls
• ComboBox allways showing first entry of List
• Handling When BindingSource.EndEdit Raises Exception (Bug?)
• Making DataGridView DataError set cell error text/icon
• datagrid tables styles mapping to properties of subclasses of a collection
• ComboBox and 2 Tables. Source/Destination