[RESOLVED] DataColumn Expression
How do I express a DataColumn to have a value of conditioned from another DataColumn. This is my case, I have a DataColumn("IsInactive") that receives 1 if true and 0 if false. Now, I have a DataColumn("Status") to receive a value "Active" if DataColumn("IsInactive") is 0 and "Inactive" if DataColumn("IsInactive") is 1.
DataColumn("Status").Expresison = "Need help here!";
Needing help,
NEBZ
Thanks very much.
Added [RESOLVED] to thread title - Hack
Re: DataColumn Expression
FYI...DataColumn.Expression Property
IIF
Description Gets one of two values depending on the result of a logical expression.
Syntax
Code:
IIF(expr, truepart, falsepart)
Arguments
expr-- The expression to evaluate.
truepart-- The value to return if the expression is true.
falsepart-- The value to return if the expression is false.
Example: myDataColumn.Expression = "IIF(total>1000, 'expensive', 'dear')
Hope this helps!
Re: DataColumn Expression