I'm not sure what you mean by How can I access to rows for specific row. There are a lot of scenario specific approaches to access the GridView items. For example you can use the Loaded event of the GridView to get the already loaded items in the Items collection. Please note that the items in the collection are your Business objects (in the code snippet CompanyInfo class).
List<CompanyInfo> compaanies = new List<CompanyInfo>();
foreach (CompanyInfo item in gridView.Items)
{
compaanies.Add(item);
}
}
Another case is if you have a hierarchical GridView and you want to access the hierarchical items. For example if you have a hierarchical GridView and expand the row with index 5 and click a button with the event handler as shown below in the code snippet you will get all the b for the selected row. This is done by using the ItemContainerGenerator.ContainerFromItem() method to get the container for the row. Then you can use the ChildrenOfType<GridViewRow>() method to get all the child rows.
var row = this.xGridView.ItemContainerGenerator.ContainerFromItem(item) as GridViewRow;
var childRows = row.ChildrenOfType<GridViewRow>();
}
In order to advise you better could you please go into detail about your case and what you need to achieve with the rows ?
We are looking forward to your response.
Regards,
Boris Penev
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.