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.

GridDataBoundGrid preserve view

Thread ID:

Created:

Updated:

Platform:

Replies:

50096 Oct 5,2006 08:28 AM Oct 5,2006 09:55 AM Windows Forms 1
loading
Tags: GridControl
Nick Gardner
Asked On October 5, 2006 08:28 AM

Hi, in a GridDataBoundgrid I want to get the current top row index so that I can preserve the current view after an update. E.g. if the grid is currently showing rows 7 to 20 and has row 14 selected, I''d like to be able to completely redraw the grid, then set the view back such that rows 7 to 20 are displayed with row 14 selected.

Thanks,

Nick

Nick Gardner
Replied On October 5, 2006 09:55 AM



>Hi, in a GridDataBoundgrid I want to get the current top row index so that I can preserve the current view after an update. E.g. if the grid is currently showing rows 7 to 20 and has row 14 selected, I''d like to be able to completely redraw the grid, then set the view back such that rows 7 to 20 are displayed with row 14 selected.

Thanks,

Nick

Resolved. For anyone interested:

int topRowIndex = queryResultsGrid.TopRowIndex;
int selectedRowIndex = queryResultsGrid.CurrentCell.RowIndex;

// do stuff

queryResultsGrid.TopRowIndex = topRowIndex;
queryResultsGrid.CurrentCell.MoveTo (selectedRowIndex, 0, Syncfusion.Windows.Forms.Grid.GridSetCurrentCellOptions.SetFocus);

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.

;