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

Display visible rows

1 Answer 53 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pavel Ruslanovich Kovyev
Top achievements
Rank 1
Pavel Ruslanovich Kovyev asked on 02 Jul 2010, 12:59 PM
Добрый день.
Использую RadGridView, данные получаю при помощи ItemSource из коллекции элементов. Строчки грида можно сгруппировать и свернуть  так, как показано во вложенном рисунке.
Как мне определить какие строки видны, а какие свернуты? Т.е. найти элементы из коллекции, которые в гриде видны.

Good afternoon.
I use RadGridView, data obtained using ItemSource from the collection of elements. Grid Lines can be grouped and collapse as shown in the attached picture.
How can I know which rows are visible and which are rolled? How can I find items from the collection, which in the grid visible.

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 02 Jul 2010, 01:32 PM
Hi Pavel Ruslanovich Kovyev,

This way you can find the rows visible at the moment ( the ones in the viewport) .

var rows = this.RadGridView1.ChildrenOfType<GridViewRow>();
*To have access to the ChildrenOfType  method you will need to add a  using Telerik.Windows.Controls;

*Please have in mind that in the collection returned the the first element would be a special row ( GridVIewNewRow ) which you may need to skip.

This way you have the rows visible. To have the data items associated with these rows  - you need read the Item property of the row , or its DataContext.

Regards,

Pavel Pavlov
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
Pavel Ruslanovich Kovyev
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or