This is a migrated thread and some comments may be shown as answers.

Determining first visible row

1 Answer 322 Views
GridView
This is a migrated thread and some comments may be shown as answers.
johns
Top achievements
Rank 1
johns asked on 07 Sep 2007, 03:26 PM
I have a table bound to a datasource that updates or gets changed frequently.  The actual number of rows does not change that much or very little.  The user will scroll through the table to look at various rows, but when the table refreshes, it always causes the grid to scroll back to the top row.  I would like the visible rows to not scroll out of view.

One thought was to save off the current top visible row index and the then scroll to it after an update, but I can't seem to find out what it is.

If you have another solution as well that would be great.

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 10 Sep 2007, 05:21 PM
Hi johns,

We will fix this issue in the upcoming Q2 release later this month. Yes, you can save/restore the current top visible row index by getting it from grid vertical scrollbar. Use this code:

GridVScrollBar vscrollbar = (GridVScrollBar)((GridTableElement)this.radGridView1.GridElement).Children[3];
int firstVisibleRow = vscrollbar.Value;

 
Sincerely yours,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
johns
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or