Activity Forums Salesforce® Discussions What is the difference between pageblocktable and datatable in VF pages?

  • Rajan

    Member
    August 20, 2018 at 10:11 am

    Hi avnish ,

    if you want to use salesforce look and feel then use pageblocktable and for datatable you can not use salesforce look and feel .

    Thanks !

  • Parul

    Member
    September 13, 2018 at 7:25 pm

    Hi

    apex:pageBlockTable

    1) uses salesforce styling
    2) No need to specify the headers
    3) mandatory attribute "value".

    apex:dataTable

    1) Need to specify the headers
    2) we can specify custom style classes.
    3) No mandatory attribute "value" unlike in pageblockTable

     

    Thanks

  • shariq

    Member
    September 14, 2018 at 12:40 am

    Hi,

    apex:datatable - 

    • Doesn't Inherit Salesforce styles
    • No <apex:pageBlock> or <apex:pageBlockSection> needed
    • For displaying data we use one or more <apex:column>, CSS styles can be applied
    • Headers need to mentioned Seperately unless like <apex:pageBlockTable>
    • up to 1,000 items.

    apex:pageblocktable - 

    • Inherits Default Salesforce styles
    • must be under <apex:pageBlock> or <apex:pageBlockSection>
    • For displaying data we use one or more <apex:column>
    • up to 1,000 items.

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos