This is a migrated thread and some comments may be shown as answers.

ShowParentGroupSummaries don't update

1 Answer 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nadia Sangiovanni
Top achievements
Rank 1
Nadia Sangiovanni asked on 11 Jul 2012, 05:39 PM
Dear Support,

We use RadGridView with Summaries rows and Parent Summaries rows. On loading all sum are correct. But when the user change a value in the grid, the summaries are updated but not the parent summaries rows.

I attached pictures showing the problem. AfterLoad is the gris after the form is loaded, and afterChange is the gris when I change the value of the first row from 75 to 65. Top Summaries and group summaries have updated but not the parent summaries.

Please advise,
Nadia

1 Answer, 1 is accepted

Sort by
0
Accepted
Jack
Telerik team
answered on 16 Jul 2012, 01:41 PM
Hello Nadia,

Thank you for bringing this issue to our attention.

I confirm that the issue appears in our latest release and I logged it in our issue tracking system and you can track its status by following this link. The issue will be addressed in one of our upcoming releases. I updated also your Telerik points.

You can work around it by handling the CellValueChanged event. Consider the following code snippet:
void radGridView1_CellValueChanged(object sender, GridViewCellEventArgs e)
{
    if (e.Column.Name == "Value")
    {
        GridViewGroupRowInfo parentRow = e.Row.Parent as GridViewGroupRowInfo;
        while (parentRow != null)
        {
            if (parentRow.TopSummaryRows.Count > 0)
            {
                GridViewSummaryRowInfo summaryRow = parentRow.TopSummaryRows[0];
                MethodInfo mi = summaryRow.GetType().GetMethod("ClearCache", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
                mi.Invoke(summaryRow, new object[] { });
                summaryRow.InvalidateRow();
            }
            parentRow = parentRow.Parent as GridViewGroupRowInfo;
        }
    }
}

I hope this helps.
 
Greetings,
Jack
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
Nadia Sangiovanni
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or