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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disable GridDataBoundGrid autoscroll into view

Thread ID:

Created:

Updated:

Platform:

Replies:

46985 Jul 26,2006 08:56 AM UTC Jul 26,2006 12:20 PM UTC WinForms 4
loading
Tags: GridControl
Jay
Asked On July 26, 2006 08:56 AM UTC

We are using a GridDataBoundGrid as a filter row to the main grid and need to sychronise column positions and widths between grids.

If you select a column in our filter grid that is not fully visible the row is scrolled until the column is visible. However, this causes the filter grid and main grid to get out of alignment. Is there a way to prevent the GDBG from autoscrolling?

Thanks

Administrator [Syncfusion]
Replied On July 26, 2006 09:42 AM UTC

Hi Jay,

You can subscribe to the TopRowChanging event and set e.Cancel = true when you want to stop the auto scrolling and then un-subscribe when you want to start them. Here is a code snippet.

////For Vertical scrolling , to subscribe TopRowChanging event and handle the e.Cancel arg.

this.grid.TopRowChanging +=new GridRowColIndexChangingEventHandler(grid_TopRowChanging);
private void grid_TopRowChanging(object sender, GridRowColIndexChangingEventArgs e)
{
e.Cancel = true;
}

////to unsubscribe TopRowChanging event
this.grid.TopRowChanging -=new GridRowColIndexChangingEventHandler(grid_TopRowChanging);

Let me know if this helps.
Best Regards,
Haneef

Jay
Replied On July 26, 2006 10:45 AM UTC

Thanks for the reply. Is there an equivalent for horizontal scrolling?

The problem is that a partially visible column is scrolled left or right until it is visible which causes the grids to become misaligned.

Administrator [Syncfusion]
Replied On July 26, 2006 11:04 AM UTC

Hi Jay,

You need to subscribe the LeftColChanging event and set e.Cancel to true. Please find the code snippet below.

this.grid.LeftColChanging +=new GridRowColIndexChangingEventHandler(grid_LeftColChanging);

private void grid_LeftColChanging(object sender, GridRowColIndexChangingEventArgs e)
{
e.Cancel = true;
}

Best Regards,
Haneef

Jay
Replied On July 26, 2006 12:20 PM UTC

That works great. Thanks for your help!

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.

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

;