function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AnushaAnusha 

Differece between Repete, DataTable, PageBlockTable

Hi Guys,:smileyhappy:

Can any one Differenciate the Repete, dataTable and PageBlockTable

haveing problem with these three...

Please any one answer my Quesion.....

UrsfriendlyUrsfriendly

 

<apex:repeat>

<apex:DataTable>

 

Both  are used to get data from Collections,but

 

   1. By using <apex:repeat> we can't get proper alignments,just it displays data,but in <apex:datatable> we can get columns wise alignment data.

 

   2.In <apex:repaet> there is no javascript events like onmouseover,onclick..........but they are available in <apex:datatable>

 

   3. Main Difference Between <data:table> and <apex:pageblocktable> is,Unlike the < apex:dataTable > component, the default styling for < apex:pageBlockTable > matches standard Salesforce styles. Any additional styles specified with < apex:pageBlockTable >

 attributes are appended to the standard Salesforce styles

 

 

Note:Here BY using above three We can get up to 1000 items only from lists

Pradeep_NavatarPradeep_Navatar

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 body of the < apex:dataTable > contains one or more column components that specify what information should be displayed for each item of data. The data set can include up to 1,000 items.

 

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. Any additional styles specified with < apex:pageBlockTable > attributes are appended to the standard Salesforce styles.

 

Apex:repeat – This tag is used as for loop(for list) in apex. You can iterate a list.

murarimurari

PageBlockTable:

->pageblocktable should be inside of <apex:pageblock> or <apex:pageblocksection>

-><apex:pageblocktable> has a required attribute called "value"

->it uses the standard salesforce page styles

->column headers will be displayed automatically

 

DataTable:

->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

 

Repeat:

-> there is no proper allignment of data in repeat as compared with datatable