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.
Syncfusion Feedback

Scrooll Bar Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

67286 Aug 13,2007 11:13 AM UTC Aug 18,2007 09:24 AM UTC Windows Forms 1
loading
Tags: GridControl
Gourav Nayyar
Asked On August 13, 2007 11:13 AM UTC

Hi
i am using GridDataBound Grid and i have faced a issue in grid scrollBar. when ever i moved one column from one position to another position . the scrollbar comes to the start position(Means again comeback to the first column ) not to the column where it comes as per normal.

So pl'z suggest me solution for the problem

Thanks in Advance
Gourav Nayyar

Meera Fathima [Syncfusion]
Replied On August 18, 2007 09:24 AM UTC



Hello Gourav,

I am sorry about this delay in responding. If your intention is to restrict the horizontal scrollbar to move back to the start position while moving the grid columns from
one position to another you can do this by setting the column index value within the GridDataBoundGrid.QueryScrollCellInView event. Below is the sample code snippet
that demonstrates this.

// Occurs before the grid is scrolled when the left column index is changed.

this.gridDataBoundGrid1.LeftColChanging += new GridRowColIndexChangingEventHandler(gridDataBoundGrid1_LeftColChanging);

this.gridDataBoundGrid1.QueryScrollCellInView += new GridQueryScrollCellInViewEventHandler(gridDataBoundGrid1_QueryScrollCellInView);


int hsScrollBar;
void gridDataBoundGrid1_LeftColChanging(object sender, GridRowColIndexChangingEventArgs e)
{
this.hsScrollBar = this.gridDataBoundGrid1.HScrollBar.Value;

}

void gridDataBoundGrid1_QueryScrollCellInView(object sender, GridQueryScrollCellInViewEventArgs e)
{
e.ColIndex = this.hsScrollBar;
}

I have also attached the sample with this post that shows the above details - http://websamples.syncfusion.com/samples/Grid.Windows/F67286/main.htm

Please look into the above details and let me know if you have any questions.

Best Regards,
Meera.

Syncfusion, Inc.
http://www.syncfusion.com/


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

;