You need to sign in to do that
Don't have an account?
SFDC_Beginer
Reg: Styles on VF page
Hi,
I have a list of records that are returning from class to vf of pageblocktable.
Now, in that list the field status__c contains the values pass or fail.
suppose if the status__c is "fail" then i would like to apply the color as "Red". If it is "pass" i would like to apply the color as "Green" to this value on VF page.
Can any one please give a statement for applying different colors using style class on vfpage?
Thanks
HI
You can use this syntax.
<apex:outputText style="color:{!IF(status__c == fail,Red,Green)}">{!status__c}</apex:outputText>
[If you got answer from my post please mark it as solution.]
Thanks.
KapiL
All Answers
HI
You can use this syntax.
<apex:outputText style="color:{!IF(status__c == fail,Red,Green)}">{!status__c}</apex:outputText>
[If you got answer from my post please mark it as solution.]
Thanks.
KapiL
Can u plz resend the correct syntax!
It is asking a property in apex class.
Thanks
HI
Write this one..
<apex:outputText style="color:{!IF(status__c == 'fail','Red','Green')}">{!status__c}</apex:outputText>
Thanks.
KapiL