The following code iterates through all of the groupheaderitems in my RadGrid. I was originally having trouble expanding groups programmatically because I was attempting to expand based on sequential item.groupindex indexes, e.g. if (item.groupindex == "0" || item.groupindex == "1".
However, I found that the groupindex == "1" wasn't working so I wrote the following method to append all of the indexes to a stringbuilder:
When I run the application, the stringbuilder contains {02468} and so on rather than what I thought should be {01234}
Does anyone know why the GroupHeaderItem indexes increase by two rather than by 1? This doesn't affect my code, as now I know what to look for, but I was just wondering about the reasoning behind this.
Thanks,
Josh
However, I found that the groupindex == "1" wasn't working so I wrote the following method to append all of the indexes to a stringbuilder:
protected void WeeklyGoalsGrid_PreRender(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
foreach (GridGroupHeaderItem item in WeeklyGoalsGrid.MasterTableView.GetItems(GridItemType.GroupHeader))
{
sb.Append(item.GroupIndex);
}
}
When I run the application, the stringbuilder contains {02468} and so on rather than what I thought should be {01234}
Does anyone know why the GroupHeaderItem indexes increase by two rather than by 1? This doesn't affect my code, as now I know what to look for, but I was just wondering about the reasoning behind this.
Thanks,
Josh