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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

covered ranges and scrolling

Thread ID:





60346 May 2,2007 11:44 PM UTC May 5,2007 04:15 AM UTC WinForms 6
Tags: GridControl
j g
Asked On May 2, 2007 11:44 PM UTC

I have rows with covered ranges of various sizes that span columns. If the beginning of a covered range is not visible and I click on it, the grid automatically scrolls left to make it visible. Is there any way to prevent the grid from scrolling? It's particularly an issue when I am using the keyboard to navigate the grid rows. The grid will scroll left and right as I move the current cell frame up and down on the various sized ranges.

haneefm [Syncfusion]
Replied On May 3, 2007 03:39 PM UTC

Hi J shonw,

The AllowScrollCurrentCellInView property specifies the mask for which reason the scrolling should happen, this defines the ScrollCurrentCellInView behavior of the grid. You can try setting this to GridScrollCurrentCellReason.None and let me know if this helps.

this.gridControl1.Model.Options.AllowScrollCurrentCellInView = GridScrollCurrentCellReason.None;

Best regards,

j g
Replied On May 3, 2007 04:42 PM UTC

I tried setting AllowScrollCurrentCellInView to none and it works great when I click on a covered range. But, now the grid will not scroll down or up when I use the up and down keys to move current cell frame. In this case, it appears that I will have to handle the scrolling myself, unless there is a better way?

haneefm [Syncfusion]
Replied On May 3, 2007 06:23 PM UTC

Hi J shonw,

You can try this code:

this.gridControl1.Model.Options.AllowScrollCurrentCellInView = GridScrollCurrentCellReason.MoveTo ;

Best regards,

j g
Replied On May 4, 2007 07:53 AM UTC

Haneef, it would work great if I could prevent the grid from scrolling to the left when the current cell frame moves onto ranges (by clicking on AND using up and down key navigation) that are partially visible.

haneefm [Syncfusion]
Replied On May 5, 2007 12:56 AM UTC

Hi J,

You need to handle the TopRowIndexChanging event for cancelling the up and down movement of the cellview in a grid and ahndle LeftColChanging event for cancelling the left to right/right movement of the cellview in a grid. Please try the attached sample and let me know if this helps.

Sample : CoverdeRange.zip

Best regards,

j g
Replied On May 5, 2007 04:15 AM UTC

Haneef, this is perfect! Thanks a lot.


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