I wish to format an entire row based on the value of one cell in the row. Alternately I wish to format cell X based on the value of cell Y. Are either of these possible?
I figured out how to use a FormulaCondition to make the formatting of cell X depend on a value in cell Y.
Where can I find documentation about the Formula syntax?
Typically the best way to figure this out is to check the designer code. Add a column with a formula condition then check out the code. The operator conditions are very similar.
Here's a snippet from the designer of one of my apps. Sets two different conditions, one for true the other for false. Note that the designer does this all in one shot and the code is a little messy, but you can rewrite to add your own at run-time very easily.
Infragistics.Win.
ConditionValueAppearance conditionValueAppearance28 = new Infragistics.Win.ConditionValueAppearance(new Infragistics.Win.ICondition
[] {
((Infragistics.Win.
ICondition)(new Infragistics.Win.FormulaCondition("[Encrypted?] = true()"
))),
ICondition)(new Infragistics.Win.FormulaCondition("[Encrypted?] = false()")))}, new Infragistics.Win.Appearance
Typically, the designer for the formula condition will tell you if you have entered a valid formula or not. The syntax is pretty straightforward.
Hope it helps
The formulas use the UltraWinCalcManager component, so you can find out more about formulas and functions by checking out the CalcManager documentation.
Mike, thank you for your response.
I had looked at this documentation, but it is focused on using the designers. I really just want an overview of the grammar, since I am setting stuff up at run time, but not using the formula builder. I figured out enough to be able to do what I need to do, but in general the infragistics documentation focuses too much on designers, and not enough on coding.
Hi,
I thought there was a page somewhere that discusses the syntax for CalcManager, but I can't seem to find it, so maybe I am wrong.
I'm going to forward this thread over to our Docs department so they can read your comments.
Hey guys,
This is where you can get a list of all the Excel like functions as well as examples of each:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2009.1/CLR2.0/html/WinCalcManager_Excel_Style_Functions.html
Also, what I did when learning Calc Manager was to use the design-time Formula Builder:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2009.1/CLR2.0/html/WinCalcManager_About_WinCalcManager.html
Every Object.Formula property will have the ellipse [...] button that will launch the Formula Builder. Create your formulas in this fashion by dragging and dropping the functions, operators, references, and anything else that you wish to participate in the calc-network. Then you just observe the syntax that is used to create the formula. Once you know how this works, you can just simply create your formula string and assign it to the respective Formula property.