[SalesForce] Dynamic table in salesforce using HTML

I have a list of record in my controller. I want to display the record into my VF page but don't want to use salesorce components want to display the list into a HTML table 1 by 1. How to achieve this.

Best Answer

I would just use the apex:dataTable component. Yes, it goes slightly against your description, but it generates pretty clean HTML as opposed to other options. http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_dataTable.htm

The other option is to utilize apex:repeat to generate your own table HTML such as:

<table>
  <apex:repeat var="rec" value="{!records}">
    <tr><td>{!rec.field__c}</td></tr>
  </apex:repeat>
</table>
Related Topic