We can not access GridGroupHeaderItem
from a GridDataItem
. Only reverse is possible.
Please try with the below code snippet.
foreach (GridGroupHeaderItem groupHeader in RadGrid1.MasterTableView.GetItems(GridItemType.GroupHeader))
{
GridItem[] children = groupHeader.GetChildItems();
foreach (GridDataItem child in children)
{
GridDataItem childItem = child as GridDataItem;
//condition
}
}