To reproduce:
- Add a grid to a blank form.
- Group the grid on a single column and expand a group row.
- Add and then remove a summary row by calling the clear method.
- You will notice that the summary row is not removed.
Workaround: reset the groups after the summary rows are cleared:
radGridView1.SummaryRowsBottom.Clear();
List<GroupDescriptor> list = new List<GroupDescriptor>();
foreach (var item in radGridView1.GroupDescriptors)
{
list.Add(item);
}
radGridView1.GroupDescriptors.Clear();
radGridView1.MasterTemplate.Refresh();
foreach (var item in list)
{
radGridView1.GroupDescriptors.Add(item);
}
radGridView1.MasterTemplate.Refresh();