+ Start a Discussion
ai501.3910110299805757E12ai501.3910110299805757E12 

want to display 10 records in a table in a single page

want to display 10 records in a table in a single page and need to click on next/previous button and if i click a record in 1st record the record must expand and show in the same page. can any one help me in this .

I got sample to create table but how to get links in table each records


vf page is

<apex:page standardController="Account" extensions="AccountTabView" >
      <apex:sectionHeader title="Account" subtitle="Details"/>
      <apex:form id="formId">
          <apex:pageBlock title="Account Records">
              <apex:pageBlockTable value="{!accountRecords}" var="ac">
                <apex:column headervalue="Owner Name" value="{!ac.Owner.name}"/>
                <apex:column value="{!ac.name}"/>
              </apex:pageBlockTable>
           </apex:pageBlock> 
       </apex:form>      
    </apex:page>

controller is:

   public class AccountTabView
    {

        public AccountTabView(ApexPages.StandardController controller)
        {
            accountRecords = new List<Account>();

            accountRecords = [select id,Name,OwnerId,Owner.name from Account];
        }
        String recordId;
        public List<Account> accountRecords{get;set;}
}

Avidev9Avidev9
There are few approaches that you can take in Additionally to handle the expanding of the row I think you can handle this using JS or by displaying the data in a popup