You need to sign in to do that
Don't have an account?
Matt Hampton
Style Help
Hello:
I have embedded a table into Custom Object Zip_Code__c however when the table shows up on the UI, it is not the same format/color scheme as the object. I know this isn't a huge deal to some, but I would like the VF component to look like it was integrated seamlessly.
Here is my code (code works great):
<apex:page standardcontroller="Zip_Code__c" tabStyle="Zip_Code__c"> <apex:pageBlock tabStyle="Zip_Code__c"> <apex:pageBlockSection columns="1"> <apex:outputPanel > <apex:dataTable value="{!Zip_Code__c}" var="zip" width="100%" columns="5"> <apex:column id="c5"> <b> <apex:outputLabel value="RF"/> </b> <br></br> <br></br> <b> <apex:outputLabel value="IPTV-C"/> <br></br> <br></br> </b> <b> <apex:outputLabel value="IPTV-F"/> </b> <br></br> <br></br> <b> <apex:outputLabel value="Total"/> </b> </apex:column> <apex:column id="c4" headerValue="Addresses"> <apex:outputField value="{!zip.RF_Addresses__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.IPTV_C_Addresses__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.IPTV_F_Addresses__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.Total_Addresses__c}"/> </apex:column> <apex:column id="c3" headerValue="Subscribers"> <apex:outputField value="{!zip.RF_Subs__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.IPTV_C_Subs__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.IPTV_F_Subs__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.Total_Subs__c}"/> </apex:column> <apex:column id="c2" headerValue="Non-Video Doors"> <apex:outputField value="{!zip.RF_Doors__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.IPTV_C_Doors__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.IPTV_F_Doors__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.Total_Doors__c}"/> </apex:column> <apex:column id="c1" headerValue="Penetration"> <apex:outputField value="{!zip.RF_Penetration__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.IPTV_C_Penetration__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.IPTV_F_Penetration__c}"/> <br></br> <br></br> <apex:outputField value="{!zip.Total_Penetration__c}"/> </apex:column> </apex:dataTable> </apex:outputPanel> </apex:pageBlockSection> </apex:pageBlock> </apex:page>
The data table is gray with a blue line on the top. What I can do to get the format to match that of the custom object?
Any help is greatly appreciated.
Thanks,
Matt
Instead of datatable use pageblocktable...
The body of the <apex:pageBlockTable> contains one or more column components that specify what information should be displayed for each item of data, similar to a table. Unlike the <apex:dataTable> component, the default styling for <apex:pageBlockTable> matches standard Salesforce styles. Any additional styles specified with <apex:pageBlockTable> attributes are appended to the standard Salesforce styles.
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_pageBlockTable.htm
All Answers
Instead of datatable use pageblocktable...
The body of the <apex:pageBlockTable> contains one or more column components that specify what information should be displayed for each item of data, similar to a table. Unlike the <apex:dataTable> component, the default styling for <apex:pageBlockTable> matches standard Salesforce styles. Any additional styles specified with <apex:pageBlockTable> attributes are appended to the standard Salesforce styles.
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_pageBlockTable.htm
Saikishore:
Thank you very much. This looks great. I will make as a solved.
Matt