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

Scrolling Events with large number of columns

Thread ID:





1882 Dec 3,2002 03:24 AM UTC Dec 4,2002 09:29 PM UTC WinForms 3
Tags: GridControl
Sue Harris
Asked On December 3, 2002 03:24 AM UTC

My grid has 1440 columns and when I scroll across (using the mouse), I regularly don't get any scroll events (I'm catching the WindowScrolled, WindowScrolling and ScrollInfoChanged events). It usually fires if I do a really fast drag click, but never when I hold the scroll bar down for a second or so. Can anyone help me please? Thanks.

Administrator [Syncfusion]
Replied On December 3, 2002 04:08 PM UTC

Hi Sue, when you hold the scrollbar arrow button down for a while the grid will accelerate the scrolling. At first it will increase the frequency of scroll messages sent and as a next step increase the number of columns scrolled at one time. At that time the scroll event will not be raised once for each column any more but instead it will be raised once for every three columns. You can check the LeftColIndex value to find out about the new left column index. I'll also make a note to add an option that will let you customize the accelaration so that you are able to turn it off comepletely or just avoid increasing the number of columns scrolled at one time. BTW - there is also a LeftColChanging and LeftColChanged event that might be better for you. The other scroll methods will be called whenever the ScrollWindow API is called, e.g. also when you just resize a column. Stefan

Sue Harris
Replied On December 4, 2002 08:13 PM UTC

Thanks, I tried your suggestion using the LeftColChanged and TopColChanged events and it has really helped. However, I do notice that if I turn on the ThumbTrack the events get called fairly spasmodically when dragging the scroll. So while dragging the scroll back and forth the grid is scrolling smoothly but the event only gets called about every second. Do you have any suggestions there? Thanks very much for your help so far. Sue

Administrator [Syncfusion]
Replied On December 4, 2002 09:29 PM UTC

LeftColChanging and LeftColChanged will be called whenever the grid has been scrolled to a new position. But, the scroll thumb will only fire a new scroll event when the grid has been completetly painted. It will always be a bit jumpy if you have lots of cells. You might check if you do any custom calculations in QueryCellInfor or PrepareViewStyleInfo or when custom drawing a cell that could slow down the painting process. Once a second sounds too less frequent. If you want us to look at an example and see what could be wrong with its implementation just open a direct-trac incident and post it there. 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