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

Dynamic table in vf page



How to create tables dynamically in vf page? For example i have 2 objects having 2 pick list fields in two fields

values are same like group1,group2,group3.....


suppose i have 5 pick list values using vf page in 2 objects pick list values are same thar records

in same table in two rows like this



hghghfghf ghghfhgf  fhffhh


fghfhf         fhhfhf         hghfhf         hghfhffh    hfhhf


but i have 5 pick list values so display records dynamically in tables horizontally. suppose i have only one grovp(picklist value) records only display only 1 table only


Any one can help?



Thank you







You can achive this using wapper class - 

> create a list of wapper class then In a wapper class use list of object.

like -


public class ABC


 public list<modelname> modellist {get;set;}

        public class modelname


public list<object> objlist1{get;set;}

public list<object2> objlist2{get;set;}






<apex:repeat value="{!modellist}" var="a">

<apex:repead value="{!a.objlist1} var="aa">




Thank you,




Please mark this as solution for others to get it easily


Hi Raj,

Thanks for your reply.


Am getting an error unexpected class modelname. Can you explain in brief.




Thank you


Hi Varun,


 You didn't write the wrpper class that's why you are getting that error


see this link and understand the Wrapper Class.


Still have any problem please let me know