Home / Community & Support / Knowledge Base / RadControls for WinForms / GridView / Iterating through RadGridView Rows

Iterating through RadGridView Rows

Article Info

Rating: 5

Article information

Article relates to

 RadControls for WinForms 

Created by

 Nikolay Diyanov

Last modified

 Oct 7, 2010

Last modified by

 Nikolay Diyanov



HOW-TO
Iterate through RadGridView Rows.

SOLUTION
When you want to iterate through the rows of your RadGridView, you should use either RadGridView.Rows or RadGridView.MasterTemplate.Rows collection. Both are references to the actual rows collection, bound to the underlying data, and processed by grid's automatic filtering, grouping, and sorting features.

Iterating through the RadGridView.MasterView.Rows is a bit slower performance-wise, but this collection is more useful when working in hierarchy mode. It is slower, because the GridViewInfo.Rows property is calculated on each request, based on the UI state of the current GridViewInfo. For example these are the rows in one sub-detail view in the hierarchy.


Comments

If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.