Can Excel-like conditional calculation (e.g. IF([Column1] = Value1, [Column2],''] be processed by XamCalculationManager? If yes, where can I find syntax/examples?
Thank you for your post.
The XamCalculationManager does support Excel-like conditional calculation. To see the syntax of this, I would recommend using the XamFormulaEditor, which has a dialog that will allow you to edit and see the required syntax for these formulas. Here is a link to our online documentation about the XamFormulaEditor: http://help.infragistics.com/doc/WPF/2016.1/CLR4.0/?page=xamFormulaEditor_Using.html.
As I can't seem to find any examples that really demonstrate this, I have created you one. This example shows a XamDataGrid working with the XamCalculationManager to evaluate the following formula: "IF(ISEVEN([id]), [id] + [number], [id] * [number])". This formula is placed on a separate unbound field, and the formula points at a pair of separate fields. This will evaluate on a per-row basis, and can be read as "If the 'id' field is an even number, then this field's value is the value of the 'id' field plus the value of the 'number' field, else it is the value of the 'id' field multiplied by the value of the 'number' field."
I have attached a sample project to demonstrate the above. I hope this helps you.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Many thanks, Andrew, this really helped!
Thank you for your update. I am glad my sample project was helpful to you and I believe it may help others in the future as well.