You need to sign in to do that
Don't have an account?

Table within each row for a table in VF
Hi ,
We need to query accounts along with contacts associated for each account and dispaly them in the following format.
1)Dispaly all accounts in a table
2)For each account we need to dispaly associated contacts in a child table for that account
i.e. For each row(account) we need to display contacts table(contacts for that account).
Can some one please help how to achieve this.
***Any help is really appreciated.
Thanks,
Naveen.

We need to query accounts along with contacts associated for each account and dispaly them in the following format.
1)Dispaly all accounts in a table
2)For each account we need to dispaly associated contacts in a child table for that account
i.e. For each row(account) we need to display contacts table(contacts for that account).
Can some one please help how to achieve this.
***Any help is really appreciated.
Thanks,
Naveen.
As an alternative to the solution above from Jyothsna, you can also use a plain html table:
Visualforce page:
And the controller:
This will output the following table. Of course the look and feel can be adjusted as you like using css.
I hope this helps!
Best regards,
Martijn Schwärzer
All Answers
Please chec kthe below sample code.
Visualforce page Controller
Output
Hope this helps you!
Best Regards,
Jyothsna
As an alternative to the solution above from Jyothsna, you can also use a plain html table:
Visualforce page:
And the controller:
This will output the following table. Of course the look and feel can be adjusted as you like using css.
I hope this helps!
Best regards,
Martijn Schwärzer
I need some enhancements to above requirement. I have posted it in below link.
https://developer.salesforce.com/forums/?state=id#!/feedtype=SINGLE_QUESTION_DETAIL&dc=Developer_Forums&criteria=OPENQUESTIONS&id=906F0000000DEjKIAW
Thanks,
Naveen.