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
visualforce_devvisualforce_dev 

columns as rows..

Hi,

 

Can we display the result of a query as a single row?

 

E.g : select colorfield from obj where name ='abc'

 

where coclorfield is a formula field stores some color value based on a field in obj.

 

I did like this

 

<apex:repeat value="{!colors}" var="c"> <TR> <TD bgcolor="{!c.colorfield__c}" width="0" height="1">t</TD> </TR> </apex:repeat>

 but the results are comin in multi rows..

I want it in a single row

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Richie DRichie D

What about this?

 

 

<tr><apex:repeat value="{!colors}" var="c"><TD bgcolor="{!c.colorfield__c}" width="0" height="1">t</TD></apex:repeat></tr>

 

 

 

All Answers

Richie DRichie D

What about this?

 

 

<tr><apex:repeat value="{!colors}" var="c"><TD bgcolor="{!c.colorfield__c}" width="0" height="1">t</TD></apex:repeat></tr>

 

 

 

This was selected as the best answer
visualforce_devvisualforce_dev
Thank Richie. it works..