+ Start a Discussion
MnZ321MnZ321 

Change VF table cell color dynamically

I have a picklist called Status, displayed in a Visualforce table with fields like ..

Closed
Open
Critical

  <div id="col1">
    <apex:column >
        <apex:facet name="header">Status</apex:facet>     
        <apex:outputText value="{!account.Status__c}"/>
    </apex:column>
  </div>

How can make all fields GREEN except the ones that are Critical RED? Thanks.
Ramu_SFDCRamu_SFDC
This can be accomplished by CSS dynamic styling.  Follow the sample code in the below post

http://salesforce.stackexchange.com/questions/32853/can-i-change-the-color-of-a-vf-table-cell-dynamically