About Me

My photo
PLANO, Texas, United States

Monday, January 11, 2016

Grid in VF page

There are many ways to show the data in the form of gird in the VF pages.
  1. apex:dataTable
  2. apex:dataList
  3. apex:pageBlockTable
  4. apex:repeat
apex:dataTable 

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

apex:dataTable
  • no need to write inside <apex:pageblock> or <apex:pageblocksection>
  • there is no required value
  • data can be displayed using custom styles
  • we need to specify column headers explicitly

apex:repeat
  • there is no proper alignment of data in repeat as compared with datatable
  • there is no javascript events like onmouseover,onclick.
  • simply data displayed in irregular format

apex:dataList
  • An ordered or unordered list of values that is defined by iterating over a set of data.
  • It support js event onclick , ondblclick etc

Note: The data set can include up to 1,000 items in all above component. Use Readonly attribute to increase the limit.

No comments:

Post a Comment