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.

covered ranges and scrolling

Thread ID:

Created:

Updated:

Platform:

Replies:

60346 May 2,2007 07:44 PM May 5,2007 12:15 AM Windows Forms 6
loading
Tags: GridControl
j g
Asked On May 2, 2007 07:44 PM

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 11:39 AM

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,
Haneef

j g
Replied On May 3, 2007 12:42 PM

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 02:23 PM

Hi J shonw,

You can try this code:

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

Best regards,
Haneef

j g
Replied On May 4, 2007 03:53 AM

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 4, 2007 08:56 PM

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,
Haneef

j g
Replied On May 5, 2007 12:15 AM

Haneef, this is perfect! Thanks a lot.

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.

;