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

how to programmatically scroll to next visible set of rows.

2 Answers 130 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Joshua
Top achievements
Rank 1
Joshua asked on 04 Apr 2011, 06:17 AM
I want to be able to create a button that when pressed will scroll the grid down to the next set of rows that were not visible. e.g. if the grid is showing 10 rows, pressing the button will scroll the grid down till row 11 is the top row.

I've tried using selecteditem but the grid doesn't focus on the row. Also is there a way to iterate through the rows to get their heights so I know which ones are visible or not?

2 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 04 Apr 2011, 04:09 PM
Hello Joshua,

The problem with focusing the CurrentItem occurs because it is changed programmatic - and the CurrentCell is not changed. Therefore you need to set the current sell to some cell as well.
Regarding scrolling to a specific row you should take a look at this article:

 http://www.telerik.com/help/silverlight/gridview-scroll-item.html;

Regarding your second question: in WPF it is better to work with the data elements and not with the visual elements. Could you please specify why exactly you would like to know which rows are visible and which ones - not. This way we can try to propose to you the best solution for your problem.

Best wishes,
Didie
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Joshua
Top achievements
Rank 1
answered on 04 Apr 2011, 11:41 PM
The end goal is to export the datagridview as an image or several images. If the grid has more data than is displayable we need to scroll down to the next set of data and create another image.
Tags
GridView
Asked by
Joshua
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Joshua
Top achievements
Rank 1
Share this question
or