tbaseflug
asked on
Datagrid - Case Statement
I Have a datagrid that is being populated via a dataset from a sproc -
Essentially, I have a column that contains a list of numeric values - what I want to do is create a case statement that says somthing similar to:
if column value = 1 then datagrid column = "500MHz"
else
if column value = 2 then datagrid column = "550MHz"
- I need to know how to create the case statement and then what I need to put in for the column text value to display the results?
Anyhelp is greatly appreciated!!!
Essentially, I have a column that contains a list of numeric values - what I want to do is create a case statement that says somthing similar to:
if column value = 1 then datagrid column = "500MHz"
else
if column value = 2 then datagrid column = "550MHz"
- I need to know how to create the case statement and then what I need to put in for the column text value to display the results?
Anyhelp is greatly appreciated!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
tbaseflug,
If you only had 2 conditions, i'll advise you to use
If..else instead of Case statement. Less job to checking the additonal condition.
If you only had 2 conditions, i'll advise you to use
If..else instead of Case statement. Less job to checking the additonal condition.
ASKER
Thanks! Works great - also, wanted to ask what I would do if I had 2 conditions to check - would I us2e an if else statement?