+ Start a Discussion
YonathanYonathan 

How to dynamically create a table?

Hi all,

I would like to create table columns dynamically.
The object is known (i.e Account) but the field list is dynamic.I can add or remove field from the list.
So I need a mechanism that will allow me to render fields, and create my table dynamically.

Here is my Page code :

Code:
<apex:repeat value="{!Accounts}" var ="Account"> 

<apex:outputText value="{!Account.?????????}" /><br/>
</apex:repeat>
 


Any Idea ?
MohanaGopalMohanaGopal
Hi..
 
       Use rendered attribute in ur outputtext
 
Code:
<apex:repeat value="{!Accounts}" var ="Account">  
         <apex:outputText value="{!Account.—–˜™—–˜™?}" rendered="{!ur condition}"/><br/>
</apex:repeat>