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
1190
xamdatagrid SummaryEvaluationMode UseLINQ does not work with filtering
posted

I was testing setting my grid SummaryEvaluationMode = UseLINQ to see if it would give me better performance, but i noticed that the summaries would include data that was filtered out using the grids built in filters.  If i switch back to Auto than everything works as expected.  Is there something I need to do to use LINQ for my summaries but still allow filtering on my grid or are those two settings not compatible for some reason.  Thanks

Parents
No Data
Reply
  • 1935
    Verified Answer
    posted

    Hello John Millage,

    When SummaryEvaluationMode property is set to "UseLINQ", the summary calculations are performed based on the data source collection and if a filtering is applied, the summary value is not updated because the collection items count in the data source is not changed, the items are only filtered out in the grid and not in the collection.

    What you could do is to set the XamDataGrid's DataSource to an object of ICollectionView and set FilterEvaluationMode property to "UseCollectionView". The usage of the collection view in this scenario is that it can be filtered out and the summary value will be updated properly.

    Please take a look at the attached sample and let me know if you have any other questions on this matter.

    XamDataGrid_SummaryEvaluationModeToUseLINQ.zip
Children