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
RichardR1RichardR1 

dataTable row borders

I want to put borders on every row but it seems that my rows are not being detected as rows, and that's why I don't see borders where I want them to be, which is between the rows...
 
<apex:dataTable value="{!Contact}" var="a" align="center" border="4" cellspacing="3" cellpadding="4" rules="all">
   
       <apex:column headerValue="Hard preference?" width="50px" >
        <apex:outputField value="{!a.Handle_with_care__c}" /> <br></br>
        <apex:outputField value="{!a.Handle_with_care__c}"/>
       </apex:column>

       <apex:column headerValue="Preference Category" width="400px" >
        <apex:outputField value="{!a.Handle_with_care_description__c}" /> <br></br>
        <apex:outputText > Travel </apex:outputText>
       </apex:column>

       <apex:column headerValue="Preferences" width="300px" >
        <apex:outputField value="{!a.Geographic_HWC__c}" /> <br></br>
        <apex:outputField value="{!a.Travel_HWC__c}" />
       </apex:column>
      
       <apex:column headerValue="Additional Notes" width="300px" >
        <apex:outputField value="{!a.Geographic_Preferences_Notes__c}" /> <br></br>
        <apex:outputField value="{!a.HwC_Preferences_Notes__c}" />
       </apex:column>
      
       <apex:inlineEditSupport />
</apex:dataTable>

 
RichardR1RichardR1
Attached is a screenshot of what it looks like right now. I want to know how to put a border from between tall the rows.dataTable screenshot
ANUTEJANUTEJ (Salesforce Developers) 
Hi Richard,

I found the below link which has an example of adding column borders to the cells can you please have a look at the code and see if this helps.

>> https://www.lightningdesignsystem.com/components/data-tables/

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you