function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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