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

Account name associate contacts

Display Account name in one line and associate contacts displayed in the below of account name using page block table.



Eg:Burlington Textiles Corp of America


           firstname                last name                          phone                                         email

           jock                           Rojers                      984594898765                            




like all accounts and associate contacts are below one...


i use page block table for display contacs but it display all  the contacts..



You won't be able to do this in a pageblocktable using the standard objects, as the assmption is that every item of data spans exactly one column.  Thus if you embed the iterator for contacts (via pageblocktable, datatable or a regular HTML table) that will span exactly one column.


What you can do is to create a data structure that is a list of list of strings, where the outer list represents the rows and the inner list represents the cells.  Then you'd build this such that the first "row" has the "cells" specific to account, and the second to nth row has the cells specific to the contact.