Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
Summary Row refresh
posted

I have a class with the three property members.  Amount, Frequency, and a calculated field of  MonthlyTotal (Amount * Frequency).  My grid is bound to this object.  I have a summaryRow for the monthlyTotal column.  The summary row correctly shows my sum. 

If I change the Amount in the grid on the fly, the MonthlyTotal gets updated, but the summary row doesn't unless I 'refresh' it (i.e. I sort by that column).  Ideas on what I might be missing? Do i have do something to manually force a summary row update?

Parents
No Data
Reply
  • 332
    posted

    Hi,

    I also need to refresh the summary row at run time as the user change some data in grid. I found the workaround to refresh the summary row.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    private void

    RefreshSummary(string columnKey) {

    Infragistics.

     

     

    SummaryDefinition

    summary =

    (

     

     

    from Infragistics.SummaryDefinition

    sum

     

     

     

    in

    _baseGrid.GetXamGrid().SummaryRowSettings.SummaryDefinitionCollection

     

     

     

    where sum.ColumnKey ==

    columnKey

     

     

     

     

     

     

    select

    sum).First();

    summary.SummaryOperand.IsApplied =

     

     

    false

    ;

     

     

     

    TextColumn quantity = _baseGrid.GetXamGrid().Columns[columnKey] as TextColumn

    ;

    Infragistics.

     

     

    SummaryOperandBase

    sumOperand =

    (

     

     

    from Infragistics.SummaryOperandBase sum in

    quantity.SummaryColumnSettings.SummaryOperands

     

     

     

    where sum.LinqSummaryOperator == Infragistics.LinqSummaryOperator

    .Sum

     

     

     

    select

    sum).First();

    sumOperand.IsApplied =

     

     

    true

    ;

     

     

Children