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.
Unfortunately, activation email could not send to your email. Please try again.

Virtual grid drawing problem in MDI child

Thread ID:

Created:

Updated:

Platform:

Replies:

17010 Jul 28,2004 10:13 PM Jul 29,2004 02:34 AM Windows Forms 1
loading
Tags: GridControl
Dan
Asked On July 28, 2004 10:13 PM

I have come across a very weird drawing problem with the Grid control, version 1.6.1.8 I''ve enclosed a simple app to demonstrate the problem. Quick summary: Virtual grid on a MDI child window that starts out maximized. First child window and grid show up fine. 2nd through N child windows cause the grid to paint slow and re-render a few times with different column widths, etc. Ends up destroying the MDI parent container and min/restore/max buttons. Run the app, choose File / New Virtual. Everything is fine. Again, choose File / New Virtual. This time, the grid is painted slowly, and you can see refreshes of the column widths. Also notice the min/restore/max buttons in the top right. There should only ever be one set of these, but now there are 2. Again, choose File / New Virtual. Now you''ll see THREE min/restore/max buttons in top right. Click the restore button to bring the child windows to a "cascaded" state - and you''ll see, the MDI children painting area is ruined. Note that if the child window property is set to show the window in Normal state (not maximized), I don''t see the problem. Also - the other menu choice, standard grid, doesn''t show this problem, even with maximized child forms. So it seems to be a problem with the virtual grid. Some questions: - Is there a way to turn off the QueryXXX calls during setup of the grid? After I call ResetVolatileData(), it seems that many of the calls to HideRows, AllowSelection, DefaultColWidth, etc. all cause calls to QueryColCount, etc. I tried Begin/EndUpdate and Suspend/ResumeLayout calls, but doesn''t work. THANK YOU VERY MUCH for looking into this... gridtest_6055.zip

Administrator [Syncfusion]
Replied On July 29, 2004 02:34 AM

Try this as a simple work around. On Form2, put a Panel where you now have the grid and anchor it. Then drop the grid into the Panel and set grid.Dock = Fill. Then try things. I think what is going on is that the grid is being sized to the form before the form has had its final size setting. At this point, the row count event is not hook. Then later when the form is finally size (with the row count event hooked), things get confused. The grid does special handling of the initial positioning in a form, postponing it until the first time the grid is drawn. By making the grid''s parent the panel, this special form positioning code is avoided, and this seems to avoid this problem in your sample.

CONFIRMATION

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.

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.

;