We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Size Problem with mdi child

Thread ID:





14973 Jun 9,2004 07:25 AM UTC Jun 10,2004 08:30 AM UTC WinForms 4
Tags: GridControl
Administrator [Syncfusion]
Asked On June 9, 2004 07:25 AM UTC

I have a grid on a mdi child form that is anchored at top,bottom,left and right so that it sizes proportionally to the size of the mdi child window. This works fine when resizing the window, and maximise and un-maximise. However when I minimise the mdi form then maximise it again the size of the grid control has extended past the boundaries form, and I get my buttons and text boxes floating over the top of the grid. Is the a problem with the grid or with my code, I have added the following event handlers to get my columns to size correctly. Code: Form Load AddHandler grd_Data.Model.QueryColWidth, AddressOf GetColWidth AddHandler grd_Data.SizeChanged, AddressOf SizeRefreshGrid Handler Code: Private Sub GetColWidth(ByVal sender As Object, ByVal e As GridRowColSizeEventArgs) If e.Index = 5 Then e.Size = grd_Data.ClientSize.Width - (Me.grd_Data.Model.ColWidths.GetTotal(1, 4) + Me.grd_Data.Model.ColWidths.GetTotal(6, 9)) e.Handled = True End If End Sub Private Sub SizeRefreshGrid(ByVal sender As Object, ByVal e As System.EventArgs) grd_Data.Refresh() End Sub Thanks again, Mark

Administrator [Syncfusion]
Replied On June 9, 2004 08:40 AM UTC

I tried to see the problem in the attached sample and could not. Can you? Instead of using the grid''s Sized changed event to force a refresh, I think you can just set the grid.SmoothControlResize = false. (The sample uses this and and seems to redraw OK.) Just something else to try. Put a panel on the form where you now have the grid, and anchor the panel on all four sides like you have the grid. Then move your grid into the panel and set its Dock = Fill. MDI_9414.zip

Administrator [Syncfusion]
Replied On June 10, 2004 05:57 AM UTC

Thanks for the sample, I can make the sample go wrong as well. Here is how I made it mess up. 1.) When form loads, minimise the child window onto the mdi parents dock. 2.) Restore the window to previous state by clicking on the first(two squares over each other) sizing control. Et Volia, grid is all messed up I have attched a zip with screen shots. I am running .net v1.1 vs latest version with all updates. Mark mdiscreens_3151.zip

Administrator [Syncfusion]
Replied On June 10, 2004 06:05 AM UTC

Just tried that panel suggestion and its seems to have solved the sizing problem. Still would like to get it to work without the panel though. thanks, Mark

Administrator [Syncfusion]
Replied On June 10, 2004 08:30 AM UTC

If you replace our grid with a DataGrid, then this problem seems to go away. So, it does appear to be something that different in the Syncfusion code. I will create a QA incident so that we can research it and see if it is something we can address. In the meantime, the panel work around seems to avoid the problem.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon