+ Start a Discussion

How to create side by side tables in Visualforce?

Hi All,


There is a requirement wherein i need to create a Visualforce page having tables in the below format i.e Column names displayed vertically comming from Standard and Custom objects and values comming from Standard and Custom objects and also same type of table with different data is to be displayed to its adjacent .So can any one please help me what will be best option for doing this in Visualforce?


Please kindly help and guide...


Column Name   Values

Column Name   values

Column Name   values

Maros SitkoMaros Sitko

if you need have data from more objects in one table, adn these objects are not connected via lookups (or master detail). Try to create inner object, where you put values (or whole objects). Then create list of these inner objects


public with sharing class MyController {
 /* inner class */
 public class OppInfo {
        public Opportunity Opp {get; set;}
        public Account Acc {get; set;}
        /* constructor */
        public OppInfo() {
 /* constructor of contructor */
 public MyController(){
  // your logic
  list<OppInfo> listOpps = new list<OppInfo>();
  //add value
  OppInfo tempOpp = new OppInfo();
  tempOpp.Opp = Opportunity...;
  tempOpp.Acc = Account ...;