Difference between data-table vs page block table in Visualforce page

Both components used to render data in tabular format.  Datatable used to display data in simple HTML table format where as PageBlockTable uses look and feel of Standard Salesforce CSS and must be written under apex:PageBlock component.
PageBlock Table:
    1)      Must be define under apex:pageblock or apex:PageBlockSection
    2)      Uses Salesforce Standard CSS to design a visualforce page
    3)      Column Header will be displayed automatically
    4)      It has required attribute “value”
DataTable:
    1)      Need not to be written inside Pageblock or PageblockTable
    2)      There is no required value.
    3)      We need to explicitly specify the column
    4)      There is no required value


Comments

Popular Posts