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

GridDataBoundGrid preserve view

Thread ID:

Created:

Updated:

Platform:

Replies:

50096 Oct 5,2006 12:28 PM UTC Oct 5,2006 01:55 PM UTC Windows Forms 1
loading
Tags: GridControl
Nick Gardner
Asked On October 5, 2006 12:28 PM UTC

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 01:55 PM UTC



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

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

;