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
kkaalkkaal 

No formatting

I am trying to set up a table, but it does not show the Salesforce standard formatting, as I had expected:

 

 

<apex:page Controller="NexTestController" standardStylesheets="true"> <apex:form > <apex:pageBlock title="New Version"> <apex:outputPanel id="newList"> <apex:dataTable value="{!Relationships}" var="rela" id="relList" rowClasses="idd,even" styleClass="tableClass" width="100%"> <apex:column > <apex:facet name="header">Id</apex:facet> <apex:facet name="footer"><apex:inputField value="{!EditRelation.Analysis_Perios__c}"/></apex:facet> <apex:outputText value="{!rela.Id}" style="padding:4px"/> </apex:column> <apex:column > <apex:facet name="header">Analys. Period</apex:facet> <apex:facet name="footer"><apex:inputField value="{!EditRelation.Analysis_Perios__c}"/></apex:facet> <apex:outputText value="{!rela.Analysis_Period__c}" style="padding:4px"/> </apex:column> <apex:column > <apex:facet name="header">Action Code</apex:facet> <apex:facet name="footer"><apex:inputField value="{!EditRelation.Relationship_Code__c}"/></apex:facet> <apex:outputText value="{!rela.Relationship_Code__c}" style="padding:4px"/> </apex:column> <apex:column > <apex:facet name="header">Farmer</apex:facet> <apex:facet name="footer"><apex:inputField value="{!EditRelation.Contact__c}"/></apex:facet> <apex:outputText value="{!rela.Contact__r.Name}" style="padding:4px"/> </apex:column> </apex:dataTable> </apex:outputPanel> </apex:pageBlock> </apex:form></apex:page>

 

What tag do I need to use? 

 

 

EnthEnth
try putting in a pageBlockSection after your page block if you want the SFDC formatting
kkaalkkaal

This is the start of my page. The styles, I set because I want at least a simple design.

 

 

<apex:page Controller="NexTestController" standardStylesheets="true" tabStyle="Relationship__c"> <apex:detail subject="{!$CurrentPage.parameters.id}" relatedList="false" title="false" /> <apex:form id="formRelationships"> <apex:pageBlock title="Relationships" id="reltotal"> <apex:pageBlockButtons location="top" > <apex:commandButton action="{!newSetRelation}" value="New" immediate="true" /> <apex:commandButton action="{!cancelRelation}" value="Cancel" immediate="true" /> </apex:pageBlockButtons> <apex:pageBlockSection columns="1"> <apex:outputPanel id="newList" style="width:100%"> <apex:dataTable value="{!Relationships}" var="rela" id="relList" rowClasses="odd,even" styleClass="tableClass" width="100%"> <apex:column style="border-bottom:1px solid grey; padding-top:5px; padding-bottom:5px"> <apex:facet name="header"> <apex:outputPanel style="border-bottom:1px solid grey; padding-bottom: 7px;layout:block; bgcolor:silver">Action Code</apex:outputPanel> </apex:facet> <apex:facet name="footer"> <apex:outputPanel style="margin-top: 10px"> <apex:inputField value="{!EditRelation.Relationship_Code__c}" style="margin-top:10px" /> </apex:outputPanel> </apex:facet> <apex:outputText value="{!rela.Relationship_Code__c}" style="{!if(selectedRelId==rela.Id, 'height:17px;font-weight:bold', 'height:17px;font-weight:normal')}" /> </apex:column>

 What I get is:

 

  • Frame like the border in the old style
  • Head of the table has no formatting
  • Table data has no formatting

Do I use the wrong tags?