CGXFormulaSheet::SetConstraintCheck

void SetConstraintCheck(BOOL bToggle);

bToggle

TRUE if constranit checking should be enabled; FALSE otherwise

Remarks

Toggles on/off constraint checking. Constraints are limitations or conditions placed on the variables in your spreadsheet. They are expressed as algebraic statements appended to formulas. You can attach a constraint expression to any formula, by typing a semicolon (;) and the constraint conditions after the formula.

Any valid Objective Grid expression which returns a numeric value is also a valid constraint expression. However, unlike the expression that defines a cell value, a constraint expression can reference the cell in which it resides, using the symbol #.

For example, the formula

   =A1 + A2 ; #2 && #<=B5 || #==C7

means, ``the value of the current cell is the sum of cells A1 and A2, and that value must be either greater than 2 and less than or equal to the value of cell B5, or equal to the value of cell C7.''

The benefit of constraint expressions is maximized when combine with current cell reference support (#) as indicated in the above example. !!! Current cell means the cell that is actually evaluated. Don't mix that with the cell that has the focus in OG. !!!

When calculating the spreadsheet, Objective Grid ignores constraint expressions unless constraint checking is enabled and the recalculation method is set to Foreground for the spreadsheet.

See Also

 CGXFormulaSheet::SetRecalcMode  CGXFormulaSheet::SetRecalcMethod

CGXFormulaSheet

 Class Overview |  Class Members