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.

UpdateScrollBars bug

Thread ID:

Created:

Updated:

Platform:

Replies:

2026 Dec 10,2002 03:04 PM Dec 10,2002 04:34 PM Windows Forms 4
loading
Tags: GridControl
Keith Farmer
Asked On December 10, 2002 03:04 PM

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 03:30 PM

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 03:36 PM

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 1.5.1.1? Thanks, Stefan

Keith Farmer
Replied On December 10, 2002 03:51 PM

I am using 1.5.1.1. 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 04:34 PM

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

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.

;