+ Start a Discussion
prabhutumprabhutum 

How to split record from dataTable on multiple rows

Fellas-

 

First of all, this is my first VF page and I am new to web development. So the answer to what I am looking for could potentially be simple...

 

As I have many columns in my dataTable, the whole page gets stretched. How do I split the contents of record on two rows in VF?

 

Suppose, I have 6 fields, A, B, C, D, E and F. I want to display A, B and C on the first row, and D, E and F on the second row.

 

 

Field-A Field-B Field-C

-------------------------

    Field-D Field-E Field-F

---------------------------

rec1-A rec1-B rec1-C

-------------------------

    rec1-D rec1-E rec1-F

---------------------------

rec2-A rec2-B rec2-C

-------------------------

    rec2-D rec2-E rec2-F

....
and so on...

 

 

Your response will be greatly appreciated!

 

cheers,

Pr@sh...

HarmpieHarmpie

Quick & Dirty, this should work:

<table> <apex:repeat value="{!list}" var="l"> <tr> <td>{!l.col1}</td> <td>{!l.col2}</td> <td>{!l.col3}</td> </tr> <tr> <td>{!l.col4}</td> <td>{!l.col5}</td> <td>{!l.col6}</td> </tr> </apex:repeat> </table>