-3

  <table>
         <apex:repeat value="{!dataList}" var="List" id="dataTable">
            <tr>  
               <th>   Name </th>
               <th>   Status</th>
            </tr>
             <tr>  
               <td>   <apex:inputField value="{!List.Name}"/> </td>
               <td>    <apex:inputField value="{!List.Status__c}"/></td>
            </tr>

         </apex:repeat>
  </table>

I want all rows to display horizontally not vertically i.e. in the same line one after another instead of in next line. How can this be done? The headings and values, both should be repeated horizontally.

2

Just change the position of tr tag outside apex:repeat

<table>
    <tr> 
         <apex:repeat value="{!dataList}" var="List" id="dataTable">

               <td>   <apex:inputField value="{!List.Name}"/> </td>
               <td>    <apex:inputField value="{!List.Status__c}"/></td>

         </apex:repeat>
    </tr>
  </table>
  • it's not working. – kanishka Oct 5 '18 at 5:42
  • @kanishka share your updated code with the screenshot of UI. – Tushar Sharma Oct 5 '18 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.