+ Start a Discussion
nishad basha 7nishad basha 7 

how to retrieve the Table format Account of contacts using visualforce page?

 i want to display the number Accounts&contacts in table format.how to solve the above scenario please give some ideas.
Keyur  ModiKeyur Modi

You can use below code for your requirment
VF page code 

Account Name:
Controller public with sharing class TestAccCOntactContr { public List lstAccount{get;set;} public TestAccCOntactContr (){ lstAccount= new List(); lstAccount=[SELECT id,Name,(SELECT id,FirstName,LastName,Phone FROM contacts) FROM Account LIMIT 50]; } }

If this will help you then please let me know.

Keyur Modi