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

aggregate sum not refreshing on grid save event refresh

1 Answer 657 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adam King
Top achievements
Rank 1
Adam King asked on 08 Dec 2016, 12:09 AM

My grid has 2 aggregate Sum()  columns which display and work properly - except for when the user updates the grid amount I want the sum to dynamically update when users tab out of the cell they're editing.

I have tried a myGrid.refresh() on the grid Save event and on the grid datasource Change event. I believe its refreshing the grid but not the sums.

 

The aggregate is added with this code:

  .Aggregates(aggregates =>
          {
              aggregates.Add(expense => expense.allowedamt).Sum();
              aggregates.Add(expense => expense.expenseamt).Sum();
          }

 

and the column and clientFooterTemplates are added with this code:

columns.Bound(expense => expense.expenseamt).HtmlAttributes(new { style = "text-align:right;" }).HeaderHtmlAttributes(new { style = "text-align:right;" }).Width(50)
            .ClientFooterTemplate("#= kendo.toString(sum, 'C') #").FooterHtmlAttributes(new { style = "text-align:right;" });
          columns.Bound(expense => expense.allowedamt).HtmlAttributes(new { style = "text-align:right;" }).HeaderHtmlAttributes(new { style = "text-align:right;" }).Width(50)
            .ClientFooterTemplate("#= kendo.toString(sum, 'C') #").FooterHtmlAttributes(new { style = "text-align:right;" });

 

Any ideas how to get the Grid summary row values to dynamically update ?

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 09 Dec 2016, 02:15 PM
Hi Adam,

I would recommend you to examine the following forum thread where the same question is already discussed. Please give this suggestion a try and let me know about the result.

I am looking forward to your reply.

Regards,
Kostadin
Telerik by Progress
Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
Tags
Grid
Asked by
Adam King
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or