<apex:dataTable > :
This component is used to display list of records in the vf page .
1. It can display 1000 records in the VF page
2. This will display the data in column wise .
3. No standard salesforce look and feel and CSS is applied
Attributes :
[Link]
: The position of the rendered HTML table with respect t
o the page. Possible values include "left", "center", or "right".
If left unspecified, this value defaults to "left".
[Link]
: This is text value that indicats the backgroud
color of dataTable
[Link]
: This is a integer value which indicates the with
of the frame border in pixels
[Link] : This is the style class name which should be
applied on the capiton of dataTable
[Link] : If you want to define inline styles for the
caption we can use this attibute
[Link]
: The amount of space between the border of each
table cell and its contents.
[Link]
: The amount of space between the border of each
table cell and the border of the other cells surroundi
ng it and/or the table's edge
[Link] : This is the name of the style class that is
applied on the columns of the dataTable
[Link]
: This is a integer value which indicates no of
columns that should be displayed per row.
[Link] : This will give list of values which will specify
width of every column in the row
[Link]
: This is a text value which will specify how the
content of dataTable is displayed
[Link]
: This will integer value which will specify form
which row in the list of records we have start display
ing
[Link] : This is the name of the style class that should be
applied on the footer of the dataTable
[Link]
: The borders drawn for this table. Possible values incl
ude
"none", "above", "below", "hsides", "vsides", "lhs", "
rhs", "box", and "border".
[Link] : This is the name of the style class that should be
applied on the header of the dataTable
[Link]
: This is a boolean value if set to true content
of the component is displayed
[Link]
: This is the name of the style class that should be
applied on the rows of the dataTable
[Link]
: This is a integer value which will indicate how
many rows should be displayed in the dataTable
[Link]
: The borders drawn between cells in the table.
Possible values include "none", "groups", "rows", "col
s", and "all". If not specified,
[Link]
: If we want to apply any Inline css on the dataTable
we use this
[Link]
: This is the name of the style class that should be
applied on the dataTable
[Link]
: When we keep a cursor tip on the dataTabl small
pop with this name will be displayed
[Link]
: This is a object which contains the list of
records
[Link]
: This is a cursor variable which will start from
first record and moves till the last record
[Link]
: This will specify the width of the dataTable
Example :
<apex:page standardController="Account" recordSetVar="items">
<apex:pageBlock title="DataTable">
<apex:dataTable value="{!items}" var="a">
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
</apex:dataTable>
</apex:pageBlock>
<apex:pageBlock title="DataTable">
<apex:dataTable value="{!items}" var="a" rules="cols">
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
</apex:dataTable>
</apex:pageBlock>
<apex:pageBlock title="DataTable">
<apex:dataTable value="{!items}" var="a" rules="rows">
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
</apex:dataTable>
</apex:pageBlock>
<apex:pageBlock title="DataTable">
<apex:dataTable value="{!items}" var="a" rules="all">
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
</apex:dataTable>
</apex:pageBlock>
<apex:pageBlock title="DataTable">
<apex:dataTable value="{!items}" var="a" frame="box">
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
</apex:dataTable>
</apex:pageBlock>
<apex:pageBlock title="DataTable">
<apex:dataTable value="{!items}" var="a" frame="hsides">
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
</apex:dataTable>
</apex:pageBlock>
<apex:pageBlock title="DataTable">
<apex:dataTable value="{!items}" var="a" frame="vsides">
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
</apex:dataTable>
</apex:pageBlock>
<apex:pageBlock title="DataTable">
<apex:dataTable value="{!items}" var="a" border="2" bgcolor="yellow">
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
</apex:dataTable>
</apex:pageBlock>
<apex:pageBlock title="DataTable">
<apex:dataTable value="{!items}" var="a" cellpadding="10" cellspacing="2
0" border="1" >
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
<apex:column value="{![Link]}" />
</apex:dataTable>
</apex:pageBlock>
</apex:page>