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

Scrolling Events with large number of columns

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.

3 Replies

AD Administrator Syncfusion Team 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

SH Sue Harris 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

AD Administrator Syncfusion Team 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

Live Chat Icon For mobile
Up arrow icon