Results 1 to 3 of 3

Thread: [RESOLVED] DataColumn Expression

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Resolved [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.

  2. #2
    Member scavenger's Avatar
    Join Date
    Aug 2004
    Location
    Nowhere
    Posts
    42

    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

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: DataColumn Expression

    Millions of thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width