0

This question already has an answer here:

enter image description here

  <apex:form id="SectionTrack">
        <table style="border: 2px solid black;">
           <apex:repeat value="{!listT}" var="tp" id="Track_Table"> 
           <tr><th >Track Name</th><th>Status</th><th >Task Updates</th></tr><br/>
                <tr><td rowspan="2"><apex:inputField value="{!tp.name}"/> </td><td rowspan="2"  ><apex:inputField value="{!tp.Status__c}" /></td><td><apex:inputField value="{!tp.Task_Detail__c}"/> </td></tr> <br/>
                <tr><td ><apex:inputField value="{!tp.Risk_Detail__c}"/> </td></tr><br/>
                <tr><td>Risk/Issues</td><td colspan="2" >Some Data</td></tr><br/>
                <tr><td colspan="3" >Comments:<apex:inputTextArea rows="3" cols="50" value="{!tp.Comments__c}"/></td></tr>
            </apex:repeat>                 
        </table>   

 </apex:form>

This gives a table showing the repeat data vertically, i.e. one below another. I want it to be displayed horizontally i.e. next to each other. How can the apex:repeat be modified or what changes need to be implemented to achieve this?

marked as duplicate by Derek F, David Reed, battery.cord, Himanshu, glls Oct 7 '18 at 0:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Can you share screenshot of expected UI? – Tushar Sharma Oct 5 '18 at 12:09
  • @DerekF i tried the solution given there and it didn't work for me. – Febin Oct 5 '18 at 13:07
1

I would create an outer wrapper table consiting only of one row and n tds where each td contains your table consiting only of one single row.

so it looks like

<table>
    <tr>
         <apex:repeat .... >
           <td>
              <table ...your current table....>
                    ... all your current stuff here
              </table>
           </td>
         </apex:repeat>
     </tr>
</table>

I love nested tables a lot, but some might hate them...

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