Looks like this isn't possible, I get an input not in correct format exception. I feel like the final result of a calculation should be allowed to return a string...
Yes, that would work but I have a lot of formatting built on the data type of the column. Our data is limited to numbers and strings so when I catch that exception I can just set the data type to string. Thanks for your help.
No, but why not set the column's data type to object?
That was simple enough, I suppose. I could offer my users the choice to select the data type of the column, numeric or string, but ideally I'd like to eliminate this step. Is there anyway to determine the resultant data type of a formula before assigning it to a column?
It sounds to me like the column's data type is a numeric type.
I'm trying to test another column for a range of values and then return a string representing the category it is in. Even setting the formula of a column to something simple, below, resuts in the following exception:
'HY'
{"Input string was not in a correct format."}
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt) at System.Decimal.Parse(String s, NumberStyles style, IFormatProvider provider) at System.Convert.ToDecimal(String value, IFormatProvider provider) at System.String.System.IConvertible.ToDecimal(IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at Infragistics.Win.UltraWinGrid.UltraGridCell.SetValueInternal(Object value, Boolean suppressErrorMessagePrompt, Boolean fireInitializeRow, Boolean throwExceptionOnError) at Infragistics.Win.UltraWinGrid.UltraGridCell.SetValueInternal(Object value, Boolean suppressErrorMessagePrompt, Boolean fireInitializeRow) at Infragistics.Win.UltraWinGrid.CellReference.set_Value(UltraCalcValue value) at Infragistics.Win.CalcEngine.RangeCalcInfo.EvaluateNextRow() at Infragistics.Win.CalcEngine.UltraCalcEngine.Evaluate(Int64 ticks) at Infragistics.Win.CalcEngine.UltraCalcEngine.Recalc(Int64 ticks) at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.ReCalcInternal(Int64 ticks) at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.ReCalc(Int64 millis) at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.ReCalcSynchronous() at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.VerifyReCalc() at Infragistics.Win.UltraWinCalcManager.UltraCalcManager.Infragistics.Win.CalcEngine.IUltraCalcManager.AddFormula(IUltraCalcFormula formula) at Infragistics.Win.UltraWinGrid.FormulaRefBase.RegisterFormula(String newFormulaString) at Infragistics.Win.UltraWinGrid.FormulaHolder.ReaddFormulaToCalcNetwork() at Infragistics.Win.UltraWinGrid.UltraGridColumn.set_Formula(String value)