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

How to get the number of rows visible?

1 Answer 27 Views
GridView
This is a migrated thread and some comments may be shown as answers.
cho
Top achievements
Rank 1
cho asked on 04 Aug 2014, 12:44 PM
Hi,

Is there a way to get how many rows are visible and the index of first row showing in the SrollViewer? I have tried to get ScrollViewer to get ViewPortHeight and VerticalOffset, but they are in pixels instead of the the number of items even if I set CanContentScroll=true?

Thanks in advance.

Cho

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 05 Aug 2014, 01:49 PM
Hello Cho,

You can find all the realized GridViewRows (currently into view) with the following code 
var rows = this.clubsGrid.ChildrenOfType<GridViewRow>();

I attached a possible approach to find the First and Last data objects currently shown in RadGridView. 

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
cho
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or