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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

UpdateScrollBars bug

Thread ID:





2026 Dec 10,2002 08:04 PM UTC Dec 10,2002 09:34 PM UTC WinForms 4
Tags: GridControl
Keith Farmer
Asked On December 10, 2002 08:04 PM UTC

I've recently come across what appears to be a bug in the Essential GridControl class. We're using a virtual grid setup, with data that is changing, said change events being fed to the form, which executes: ctlGrid.EndEdit(); ctlGrid.ResetVolatileData(); ctlGrid.UpdateScrollBars(); ctlGrid.Invalidate(); In this particular case, the grid is about 8 rows high, including the header. I feed it a datatable with 24 rows, which is displays properly. After scrolling to the bottom, I switch it to one with a single row. This brings (in debug mode): A first chance exception of type 'System.ArgumentException' occurred in system.windows.forms.dll Additional information: '18' is not a valid value for 'value'. 'value' should be between 'minimum' and 'maximum'. Continuing afterward, and switching back to the 24-row dataset brings up a lack of scroll bar sliders. Here's a copy of the call stack resulting from the call to UpdateScrollBars, during the switch to the single-row dataset. The value of 18 is also the row number of the first row under the header. system.windows.forms.dll!System.Windows.Forms.ScrollBar::set_Value(__int32 value = 18) + 0xda bytes syncfusion.shared.dll!Syncfusion.Windows.Forms.ReflectScrollBar::set_Value(__int32 value = 18) + 0x25 bytes syncfusion.shared.dll!Syncfusion.Windows.Forms.ScrollBarWrapper::set_Value(__int32 value = 18) + 0x2b bytes syncfusion.grid.dll!Syncfusion.Windows.Forms.Grid.GridScroll::UpdateScrollbars(bool bRedraw = true, bool bOnlyIfDimensionChanged = false) + 0x8d2 bytes syncfusion.grid.dll!Syncfusion.Windows.Forms.Grid.GridScroll::UpdateScrollbars() + 0x16 bytes syncfusion.grid.dll!Syncfusion.Windows.Forms.Grid.GridControlBase::UpdateScrollBars() + 0x1c bytes

Keith Farmer
Replied On December 10, 2002 08:30 PM UTC

FYI: I attempted Refresh() as follows, with no effect: > ctlGrid.EndEdit(); > ctlGrid.ResetVolatileData(); ctlGrid.Refresh(); > ctlGrid.UpdateScrollBars(); > ctlGrid.Invalidate();

Administrator [Syncfusion]
Replied On December 10, 2002 08:36 PM UTC

Hi Keith, do you have a sample project that lets us reproduce the problem? Please open a support incident and post it there. It might also be that you do something in a way the grid does not expect it ... Are you using version Thanks, Stefan

Keith Farmer
Replied On December 10, 2002 08:51 PM UTC

I am using I'll have to try to cobble up a sample project when I have some time, since the system this form is part of is just a bit confidential. Thinking of work-arounds, I browsed the namespace and didn't notice anything to get the current scrollbar position (which I could hopefully adjust before the UpdateScrollBars() call). Did I overlook it? Thanks for your help.

Administrator [Syncfusion]
Replied On December 10, 2002 09:34 PM UTC

The VScrollBar and HScrollBar properties give you access to Value, Minimum and Maximum properties of the scrollbars. Stefan


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

Live Chat Icon For mobile
Live Chat Icon