How do I update GroupAggregate value in FlexGrid when data changes?

Posted by: egor.kachiguine on 14 December 2018, 6:07 am EST

  • Posted 14 December 2018, 6:07 am EST

    Setting the various live sorting/grouping options on the view don't seem to work. The aggregates get recalculated when the sort order actually changes, but not otherwise.
  • Replied 12 March 2019, 7:57 am EST

    Hi - I'm sorry I didn't mark this as answered, because this approach did work for us. But in our experience, calling .Invalidate() on the grid itself worked better in this scenario, without messing with the selection, etc.

    This makes me wonder - would it be possible to use the Invalidate(CellRange) to refresh just the group rows themselves? My testing didn't seem to work, but maybe I was doing something wrong.
  • Marked as Answer

    Replied 13 March 2019, 6:23 pm EST


    I am sorry for the delay in response.

    In my opinion regarding CollectionView.Refresh() vs FlexGrid.Invalidate(), the behavior is similar(In reference of selection also) because FlexGrid.Invalidate() is also causing the groups to be re-evaluated which is possible if there is any change in underlying collection or by using Refresh(). So, I would request you to let me know if I am missing something here.

    However, Invalidate(CellRange) will just recreate the visual elements for the given range(e.g. Group Row CellRange) without enforcing CollectionView to Refresh. So, this won't be able to display the Updated Aggregate value for groups.

    So, I would request you to use Invalidate() if it works fine for you.

    Thanks and Regards,
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels