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
TapasviniTapasvini 

Creating custom table

I want to create table like below. how I can code for it?

Jia HuJia Hu
You can use HTML tag in the VF page to achieve it.
SabrentSabrent

This should give you an idea - 

 

 

 

<apex:page >

<table border="1">
<tr >
<td bgcolor='#FF0000'>row 1, cell 1</td>
<td bgcolor='#FFFF00'>row 1, cell 2</td>
<td bgcolor='#00FF00'>row 1, cell 2</td>
</tr>
<tr>
<td bgcolor='#00FF00'>row 2, cell 1</td>
<td bgcolor='#FF0000'>row 2, cell 2</td>
<td bgcolor='#FFFF00'>row 2, cell 3</td>
</tr>
</table>  


</apex:page>

 

TapasviniTapasvini

But I want to fill the colors based on the different data for the cell. Its dynamic.

means red will not be red always but it can be changed to green or orange according to the data.