Hi,
We have a xamDataGrid and are using the xamCalculationManager so the users can create new (unbound) calculated fields from the other fields in the data record.
When we apply the xamDataGrid's inbuilt filtering to the calculated fields, in general it works, but we have come across an issue when the underlying data changes.
For example if we reset and re-load the underlying data source (ICollectionView on an Observable Collection), with a filter (on the calculated field) still in place on the grid, the Calculation Manager appears not to (re)calculate the calculated field in the new data records, so the calculated field has a value of null and thus the filter will exclude all rows, i.e. for a simple filter case "> 1".
We are currently using 15.2, but this issue looks to have existed since we started using this feature in grid version 13.1
Would be great if you could confirm this is an issue and any workaround.
Many Thanks,
Chris
Hello Chris,
Thank you for choosing Infragistics.
I have been looking into your issue and I have prepared a sample application for you to test and see if the desired effect is achieved. I have created an instance of the XamDataGrid and I have bound a sample collection to it's DataSource property. I have also created a XamCalculationManager and I have set the corresponding attached property for the XamDataGrid. I have manually defined the initial FieldLayout and I have added a new NumericField with it's BindingType property set to Unbound. I have set the Formula property of the "Total" field's CalculationSettings to refer the values of the "Quantity" and "Price" fields by calculating their product.
I have created a button below the grid in whose Click event I set a new collection to the DataSource property of the XamDataGrid. In order to achieve your behavior and re-filter a newly set collection, I have set the CalculationScope property of the XamDataGrid's FIeldLayoutSettings to FullUnsortedList. The CalculationScope property controls which records and in which order they are traversed when calculating. This way the records of the new collection should be filtered according to the conditions you have added for the previous collection.
For more information in regards to the CalculationScope property, please take a look at the following link from our online documentation:
http://help.infragistics.com/Help/Doc/WPF/2015.2/CLR4.0/html/InfragisticsWPF4.DataPresenter.v15.2~Infragistics.Windows.DataPresenter.FieldLayoutSettings~CalculationScope.html
If you require any further assistance on this matter, please do not hesitate to ask.
Hi Tacho,
Thanks for the quick response.
Using CalculationScope does indeed have the desired effect and the filtered calculated fields are correctly shown when the data is reset. But we also use Summary calculations and we need these Summary calculations to be based on the filtered set of data not the full set!
Any way we can have the desired filtering on calculated fields, whilst keeping summaries applied only to the set of filtered records?
Thanks,
I created the following case for you: ' CAS-170965-T4F0Z2 ' and will update you through it. You could see it in your account in the 'Support Activity' page.
The development issue with ID of 216439 has been fixed and it is available in the latest Service Release. You can download the Service Release by logging in our web site and then going to Account\My Keys and Downloads page.
Thank you for using Infragistics Components.
We need to know how to apply this fix in the above support case.
we need our calculationmanager to apply filters AFTER all calculation just like in the case above, BUT our summaries should ONLY be done on filtered in records.
How do we go about doing both?
This is rather urgent!