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

[Solved] How to get displayed rows

3 Answers 130 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Weiqi
Top achievements
Rank 1
Weiqi asked on 25 Aug 2010, 08:54 AM
Hi,

suppose i have many rows, i want to get all the rows displayed in the screen.


Thanks

3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 25 Aug 2010, 08:57 AM
Hi Weiqi,

You can use this:

var rows = this.radGridView.ChildrenOfType<GridViewRow>();

The ChildrenOfType extension method is located in the Telerik.Windows.Controls namespace.

I hope this helps.

Sincerely yours,
Ross
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
Weiqi
Top achievements
Rank 1
answered on 26 Aug 2010, 05:33 AM

after the data is loaded,  execute var rows = this.radGridView.ChildrenOfType<GridViewRow>();
the count of rows is 0.  

i only want to get the GridViewRow displayed in the grid, not including the rows which are hidden.
0
Maya
Telerik team
answered on 31 Aug 2010, 05:02 PM
Hi Weiqi,

I am sending you a sample project illustrating how to get all visible rows (or items if needed) of the grid. You can test the application and find the result of displayed rows/items on the Button Click event. 


Sincerely yours,
Maya
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
Tags
GridView
Asked by
Weiqi
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Weiqi
Top achievements
Rank 1
Maya
Telerik team
Share this question
or