+ Start a Discussion
Sumanth Kumar 17Sumanth Kumar 17 

About displaying of account records

Hello all,
I need to display 10 records in a page where records residing in output panel.
Can anyone help me with this?
Thank you in advance !
Sumanth Kumar
Nayana KNayana K
Visualforce page:

<apex:page controller="Sample" >
    <apex:form >
       <apex:pageblock id="account" title="Account Details)" >
            <apex:pageblockTable value="{!lstAcc}" var="a">
                <apex:column value="{!a.Name}"/>
                <apex:column value="{!a.Type}"/>


public with sharing class Sample 
    public List<Account> lstAcc {get;set;}
    public sample()
        // recently created 10 records
        lstAcc = [SELECT Name, Type FROM Account LIMIT 10 ORDER BY CreatedDate DESC];


Can you please elaborate your requirement in more detail, to display 10 records outputpanel is not needed. If we keep also no problem. 
Balaji BondarBalaji Bondar
Hi Sumanth,

You can use standard set controller to achive above functionality.Please refer link below for more details:

Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you.