|
-
Dec 4th, 2005, 09:52 PM
#1
Thread Starter
Fanatic Member
[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
Last edited by Hack; Dec 12th, 2005 at 10:29 AM.
-
Dec 4th, 2005, 11:06 PM
#2
Member
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!
"It takes great courage to survive"
-kenshin himura
-
Dec 5th, 2005, 01:00 AM
#3
Thread Starter
Fanatic Member
Re: DataColumn Expression
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|