My code will work only if the count of the groups in the grid is greater than or equal to the count of the checked nodes in the treeview.
If you have more checked nodes in the treeview than groups in the grid, you can use the following code:
node.Level = 2
RadGrid1.MasterTableView.GetItems(GridItemType.GroupHeader).Length >= i + 1
GridItem = RadGrid1.MasterTableView.GetItems(GridItemType.GroupHeader)(i)
TryCast(headerItem, GridGroupHeaderItem).DataCell.Text = node.FullPath
i += 1
I hope this helps.
All the best,
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!