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
LakshmanLakshman 

How do I display a table vertical instead of horizontal using apex repeat.

Hi All,

 

I want to display table vertically instead of horizontal. How can we do this. The table should look like below:

 

Vertical header1  CellValue-VH1-1  CellValue-VH1-2...CellValue-VH1-n 

Vertical header2 CellValue-VH2-1  CellValue-VH2-2...CellValue-VH2-n 

.

.

.

Vertical headern CellValue-VHn-1  CellValue-VHn-2...CellValue-VHn-n 

 

P.S.: Where Vertical header would be fixed and the Cell Values will come from list.

 

How can we achieve the above sample table in visualforce using apex:repeat? Any thoughts/suggestion to this are appreciated.

Thank you!

 

Regards,

Lakshman

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

I wrote a blog post around rotating tables some time ago.  Its not an exact fit but should get you started:

 

http://bobbuzzard.blogspot.com/2010/09/rotating-visualforce-table.html

All Answers

bob_buzzardbob_buzzard

I wrote a blog post around rotating tables some time ago.  Its not an exact fit but should get you started:

 

http://bobbuzzard.blogspot.com/2010/09/rotating-visualforce-table.html

This was selected as the best answer
LakshmanLakshman

Thanks bob it works and I modified it according to my needs.

Now the only thing that is bugging me is that, if the value is empty/null for a column cell it is not applying css, which it should. I will fix this and let you all know the outcomes.

 

Regards,

Lakshman

Nilanjana Sengupta 10Nilanjana Sengupta 10
Hi Lakshman

Can you please provide your code