+ Start a Discussion
Sree SalesforceSree Salesforce 

in my issue is i am not getiing data as a table just displays the fields .any one find the problem

<apex:page standardController="contact" sidebar="false">
<apex:form >
  <apex:pageBlock title="hello {!$User.FirstName}!">
   <apex:pageblockTable value="{!contact}" var="v" columnswidth="25,25,25,25">
    <apex:column value="{!v.name}"/>
       <apex:column value="{!v.lastname}"/>
          <apex:column value="{!v.phone}"/>
             <apex:column value="{!v.email}"/>
   </apex:pageblockTable>
  </apex:pageBlock>
</apex:form>
</apex:page>
Best Answer chosen by Sree Salesforce
Ankit AroraAnkit Arora
Try this :

<apex:page standardController="contact" recordSetVar="CON" sidebar="false">
    <apex:form >
          <apex:pageBlock title="hello {!$User.FirstName}!">
               <apex:pageblockTable value="{!CON}" var="v" columnswidth="25,25,25,25">
                    <apex:column value="{!v.name}"/>
                    <apex:column value="{!v.lastname}"/>
                    <apex:column value="{!v.phone}"/>
                    <apex:column value="{!v.email}"/>
               </apex:pageblockTable>
          </apex:pageBlock>
    </apex:form>
</apex:page>


All Answers

Ankit AroraAnkit Arora
Try this :

<apex:page standardController="contact" recordSetVar="CON" sidebar="false">
    <apex:form >
          <apex:pageBlock title="hello {!$User.FirstName}!">
               <apex:pageblockTable value="{!CON}" var="v" columnswidth="25,25,25,25">
                    <apex:column value="{!v.name}"/>
                    <apex:column value="{!v.lastname}"/>
                    <apex:column value="{!v.phone}"/>
                    <apex:column value="{!v.email}"/>
               </apex:pageblockTable>
          </apex:pageBlock>
    </apex:form>
</apex:page>


This was selected as the best answer
Ramu_SFDCRamu_SFDC
Try using recordsetvar as below 
<apex:page standardController="contact" recordsetvar="var" sidebar="false">
<apex:form >
  <apex:pageBlock title="hello {!$User.FirstName}!">
   <apex:pageblockTable value="{!var}" var="v" columnswidth="25,25,25,25">
    <apex:column value="{!v.name}"/>
       <apex:column value="{!v.lastname}"/>
          <apex:column value="{!v.phone}"/>
             <apex:column value="{!v.email}"/>
   </apex:pageblockTable>
  </apex:pageBlock>
</apex:form>
</apex:page>


bob_buzzardbob_buzzard
I've just tried the exact same code in my dev org and I get the following:

User-added image

which displays the table styling as expected.  The only way I'd expect the styling to be missing is if you have turned off the header and standard style sheets.
Sree SalesforceSree Salesforce
thanks ankit