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
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>