Activity Forums Salesforce® Discussions What is the difference between “apex:dataTable” and “apex:pageBlockTable” components in Salesforce Visualforce?

  • shariq

    Member
    September 22, 2018 at 6:39 pm

    Both component is used to render data in tabular format. dataTable will render records in simple HTML table format whereas the “pageBlockTable” possess default look and feel of salesforce standard CSS and must be written inside “apex:pageBlock” componet.

  • Parul

    Member
    September 23, 2018 at 5:48 am

    Apex:dataTable – An HTML table that is defined by iterating over a set of data, displaying information about one item of data per row.  The data set can include up to 1,000 items.->no need to write inside <apex:pageblock> or <apex:pageblocksection>
    -> there is no required value
    -> the data can be displayed using custom styles
    -> we need to specify column headers explicitly

    Apex:pageBlockTable – A list of data displayed as a table within either an < apex:pageBlock > or < apex:pageBlockSection > component, similar to a related list or list view in a standard Salesforce page. Like an < apex:dataTable >, an < apex:pageBlockTable > is defined by iterating over a set of data, displaying information about one item of data per row. The set of data can contain up to 1,000 items.The body of the

    < apex:pageBlockTable > contains one or more column components that specify what information should be displayed for each item of data, similar to a table. Unlike the < apex:dataTable > component, the default styling for < apex:pageBlockTable > matches standard Salesforce styles.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos