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.

Grid scroll bar updating

Thread ID:

Created:

Updated:

Platform:

Replies:

20037 Oct 8,2004 04:31 AM Jan 28,2005 11:28 AM Windows Forms 7
loading
Tags: GridControl
Frank Laus
Asked On October 8, 2004 04:31 AM

Hi, I use a Form with a grid in it and I observe some strange behavior of the horizontal scroll bar. When I make the Form smaller with the maximize button (middle button upper right) the scroll bar is not refreshed when neccessary. When I then use the resize corner of the form (lower right corner) to resize the form the scroll bars are updated immediately with correct values. How can I achive that the scroll bars are always correct e.g. correctly updated? Calling Refresh() etc. on the grid does not update the scroll bars. Thanks Frank

Administrator [Syncfusion]
Replied On October 8, 2004 04:52 AM

Are you using the latest version, 2.1.0.9? This kind of behavior can be present if the gird is in a container (like a tabpage), an dthe grid is sized to the container before the container is finally sized on the form. Here is one technique that has avoid this problem in the past. Place a Panel in teh container where you are currently putting the grid (anchored/docked as the grid was anchored/docked). Then put the grid into the panel with the grid.DockStyle = fill.

Frank Laus
Replied On October 8, 2004 06:24 AM

Hi, yes, I''m using the current version. My Grid is added to a panel which is added to a tabbed pane. So in a way I''m already using the grid the way you describe it. I tried to add another pane between the form and my grid but the result was the same. Maybe there is a way to tell the grid to recalculate the scroll bars? This would do as a first workaround. Bye Frank

Administrator [Syncfusion]
Replied On October 8, 2004 07:56 AM

grid.UpdateScrollBars() will make it recalc scroll limits if needed. But this call is also done by calling grid.Refresh and you said this did not work. grid.PerformLayout() should make the grid lay itself out again. You might also try grid.ViewLayout.Reset().

Frank Laus
Replied On October 11, 2004 04:46 AM

Hi, All the method calls like Refresh() or UpdateXY() didn''t work. I just tested some operations with the grid and scroll bars and I can now describe the problem better. The problem seems to be that under conditions where not all columns are visible (due to scrolling) the grid view is not updated correctly. In a small window and after scrolling to the right there may be only two out of ten columns visible. When I now resize the window and make it larger the space for all columns may be sufficient again and the scroll bars are disabled - but the grid is not scrolled back to the left so there is no way to get back the formerly unvisible columns. There are still only two cols visible and the scroll bars are unusable (correctly, because the window is large enough). Any idea whether this is a bug or whether there is a workaround? It should be sth like scrolling the grid while/after resizing. Thanks Frank

Administrator [Syncfusion]
Replied On October 11, 2004 05:31 AM

I tried to see this behavior in this sample. It has a tabcontrol that has a grid in a panel on the second tab. Scrolling to the right and then sizing the form did not seem to cause a problem in this sample. Can you see teh problem in this sample? You might check exceptly how the grid is anchored or docked. If it has a free floating right edge, then sizing its parent smaller may effectively hide the grid''s client area on the right. In that case, there may be parts of th egrid you cannot see becuase th egrid''s parent is too small. WindowsApplication5_1712.zip

Administrator [Syncfusion]
Replied On January 28, 2005 11:24 AM

I''m seeing this very same problem. It doesn''t matter how the grid is docked. If you scroll all the way to the right, and then resize the window larger, the grid stays put (fully scrolled to the right). The empty space to the right of the grid gets bigger. The scrollbars may disappear if the window gets big enough. Thus, you cannot scroll back using the scrollbars, because they are disabled. Also, the scrollbars never seem to quite have the right values to enable scrolling all the way to the right (note that we are hiding some columns at run-time). This happens if the grid is dock-filled, or not.

Administrator [Syncfusion]
Replied On January 28, 2005 11:28 AM

Are you using 3.0.1.0? Can you send a sample to support@syncfusion.com showing the problem? Mention this forum thread in the subject line.

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.

;