AD
Administrator
Syncfusion Team
July 10, 2007 10:44 PM UTC
This is no built-in support for IF statements in an Expression column. But you can use the fact that logical expressions return 1 or 0 depending upon whether they are tru or not to write an expression that is thye equivalent of an IF statement using a linear combination of the true alternative and the false alternative weighted by the logical expression.
"([Col1] = 1) * ([Col2] * 2) + (1 - ([Col1] = 1)) * ([Col2] * 10)"
Another way is to use an unbound column instead of an expression column. In your QueryValue code that defines the value for the unbound column, you can write code to compute any value you want from the e.Record that is passed in.