You need to sign in to do that
Don't have an account?
nesh
Highlight in RED if below 75%--conditionally highlight a custom field in VF
How to highlight a custom field based on condion( Highlight in RED if below 75% ).
custom field name:Total Grade.(data type :percentage )
my vf page code:
<apex:pageblockSection title="Total Grade">
<apex:outputField value="{!newapp.Total_grade_1__c}" styleclass="{!if((newapp.Total_grade_1__c<75), 'color:red', '')}" /
</apex:pageblockSection>
above code doesnt work. my custom field data type is percentage...Please help me.
Nesh,
I'm sorry that you haven't gotten the code to work yet; but I'm volunteering to help you and I would appreciate it if you didn't yell at me with ALL CAPS. I have created a complete test - VisualForce page and controller - that shows how to accomplish what you are trying to do.
The page:
The controller:
The output:
Opportunity List Output
This example works. It provides the solution to your question. Good luck with your project.
-Glyn
All Answers
Nesh,
Try this:
And if that doesn't work, try this:
If this helps, please mark it as a solution, and give kudos (click on the star) if you think I deserve them. Thanks!
-Glyn Anderson
Certified Salesforce Developer | Certified Salesforce Administrator
Did you try the second version? It should work.
Using style="color:red" will cause the text to be printed in red color. Do you want the background filled with red? That will be a different style...
Nesh,
I'm sorry that you haven't gotten the code to work yet; but I'm volunteering to help you and I would appreciate it if you didn't yell at me with ALL CAPS. I have created a complete test - VisualForce page and controller - that shows how to accomplish what you are trying to do.
The page:
The controller:
The output:
Opportunity List Output
This example works. It provides the solution to your question. Good luck with your project.
-Glyn
I'm glad it's working for you now. Please mark my post as the solution so that others may benefit. Thank you!
-Glyn
How to call apex class from List View Custom Button ..my inside apex class code is here- how to use it...Please help me
Nesh,
You should make this a new thread - post it as a new question. I have an answer for you, but I'd like to make it a new answer to a new question. Thanks!
-Glyn