function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Saniya Khan 2Saniya Khan 2 

How to display records from second records

Hi All,
I am working on vf page where the requirement is 

in this out put pane want to display the first record 
 <apex:outputPanel layout="none" rendered="{!IF(Underwriting__c.createdDate>compaireDate,true,false)}" >
                             <apex:pageBlockSection title="Background" id="backgroundtable3" > 
                                 <apex:pageBlockSectionItem >
                                     <apex:outputPanel layout="none" >
                              <table style="height:auto;" >
                         <apex:repeat value="{!backgroundComment}" var="s">
                             <tr><td>
                                 <tr><td>Industry Category</td>
                                     <td>Industry</td>
                                 <td>Entity Type</td>
                                     <td>Trading time</td>
                                     <td>Location</td>
                                 </tr>
                         <tr>
                             
                             <td><apex:inputField value="{!s.com.Industry__c}" style="width:300px;"/></td>
                              <td><apex:inputField value="{!s.com.IndudtrySubCategory__c}" style="width:300px;"/></td>
                             <td><apex:inputField value="{!s.com.Entity_Type__c}" style="width:300px;"/></td>
                             <td><apex:inputField value="{!s.com.Trading_time__c}" style="width:300px;"/></td>
                             <td><apex:inputField value="{!s.com.Location__c}" style="width:300px;"/></td> 
                             
                         </tr>
                        <!-- </apex:repeat>
                            <apex:repeat value="{!backgroundComment}" var="s" >-->
                                 
                         <tr>
                             <td colspan="4px"><apex:inputField value="{!s.com.Background_Comments__c}" style="width:1210px;height:70px;">
                                    </apex:inputField></td>
                             <td rowspan="5px"> <apex:commandButton value="Delete" action="{!deletebgRow}" rerender="backgroundtable3" style="{!IF(s.com.id = null,'display:none','')}" >
                                        <apex:param name="toDelIdent" value="{!s.com.id}" assignTo="{!toDelQuery }" /></apex:commandButton></td>
                         </tr>
                    <!--     </apex:repeat>
                        <apex:repeat value="{!backgroundComment}" var="s" >-->
                                 <tr>
                                     <td>Purpose Of Funds</td>
                                     <td>Card Processor</td>
                                     <td>average Card Sale</td>
                                     <td>Seasonal</td>
                                     </tr>
                         <tr>
                             <td><apex:inputField value="{!s.com.Purpose_of_funds__c}" style="width:300px;">
                                    </apex:inputField></td>
                             <td><apex:inputField value="{!s.com.Card_Processor__c}" style="width:300px;">
                                    </apex:inputField>
                            </td>
                             <td><apex:inputField value="{!s.com.Average_card_sales__c}" style="width:300px;">
                                    </apex:inputField></td>
                             <td><apex:inputField value="{!s.com.Seasonality__c}" style="width:300px; ">
                                    </apex:inputField></td>
                         </tr>
                   
                       <!--  <tr>
                             <td colspan="4px" style="white-space:nowrap;"><apex:inputField value="{!s.com.Background_Comments2__c}" style="width:1210px;  height:70px;  ">
                                    </apex:inputField></td>
                         </tr>-->
                               </td>
                               </tr>
                         </apex:repeat>
                
                     </table>
                                     </apex:outputPanel>
                                 </apex:pageBlockSectionItem>
                             </apex:pageBlockSection>       
                         </apex:outputPanel>
at the moment I used repeate thats why its display all the record but i only want to show first one 

and in second output pane want to display records from second to the last 
 <apex:outputPanel id="backgroundcomment2">
                            
                           <table style="height:auto;" >
                         <apex:repeat value="{!backgroundComment}" var="v">
                             <tr style="{IF(LEN(v)<2,'display:none','')}">
                             <td style="white-space:nowrap;"><apex:inputField value="{!v.com.Background_Comments2__c}" style="width:1210px;  height:70px;  ">
                                    </apex:inputField></td>
                             <td > <apex:commandButton value="Delete" action="{!deletebgRow}" rerender="backgroundcomment2" style="{!IF(v.com.id = null,'display:none','')}" >
                                     <apex:param name="toDelIdent" value="{!v.com.id}" assignTo="{!toDelQuery }" /></apex:commandButton></td>
                         </tr>
                               </apex:repeat>
                             </table>
                                     </apex:outputPanel>
                                 
                              <apex:commandButton value="Add Row" action="{!addBackgroundRows}" rerender="backgroundtable3" >
                                   <apex:param name="addCount" value="1" assignTo="{!addCount}"/></apex:commandButton>
                             
                             <apex:commandButton value="Add Row" action="{!addBackgroundRows}" rerender="backgroundcomment2" >
                                  <apex:param name="addCount" value="1" assignTo="{!addCount}"/></apex:commandButton>
                            
                             
                         </apex:outputPanel>    


as both the output panel uses the same object is just first one display all the fields from object and in second panel want to dispay single field from the same object.

Please help me with this.
Many thanks,
Saniya