Activity › Forums › Salesforce® Discussions › What is the difference between pageblocktable and datatable in VF pages?
-
What is the difference between pageblocktable and datatable in VF pages?
Posted by Avnish Yadav on August 20, 2018 at 9:26 AMWhat is the difference between pageblocktable and datatable in VF pages?
shariq replied 7 years, 8 months ago 4 Members · 3 Replies -
3 Replies
-
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 !
- [adinserter block='9']
-
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 pageblockTableThanks
-
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.