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

How to scroll the grid programatically

Thread ID:

Created:

Updated:

Platform:

Replies:

5143 Jun 20,2003 03:10 PM UTC Jun 20,2003 06:13 PM UTC WinForms 2
loading
Tags: GridControl
Roy Muller
Asked On June 20, 2003 03:10 PM UTC

Hi! I am developing a touch-screen user interface and I have a need to scroll the grid with external button click events (Scroll +/-, Page +/-, Top/Bottom). Can anyone show me some calls to use to get Vertical scrolling to work with these external buttons? Must I use combinations of gridcontrol.ScrollCellIntoView() and gridcontrol.IsCellVisible(), or is there a more elegant solution? I have other controls that I scroll by maintaining a Scroll position value (Y offset from the top of the scrollable control). I scroll by adjusting the value and calling myScrollableControl.SetBounds(0, m_iScrollPosition, 0,0, BoundsSpecified.Y); Can I do something similar? Should I upload some code in a direct-trac support incident? Thanks for any help, -Roy

Administrator [Syncfusion]
Replied On June 20, 2003 04:10 PM UTC

Tne simple way to scroll a grid 1 row at the time is to increment or decrement grid.TopRowIndex. If you want the current cell to be there as well, you can call grid.CurrentCell.MoveTo with the new top row index.

Roy Muller
Replied On June 20, 2003 06:13 PM UTC

Thanks for the info, Clay. Let me give a little something back here; attached is a project that defines an interface for scrolling and has a few controls that implement it (one of them is the GridControl in a user control). It has some quirks, but should be informative to anyone else interested in scrolling without scrollbars. -Roy

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

;