Activity Forums Salesforce® Discussions How can we create the dynamic number column in Salesforce visualforce page?

  • Gourav

    Member
    October 3, 2016 at 12:42 PM

    Hi Mohit,

    What I understand by your question is that you are trying to insert the number in a page block table like Sr.No. If I am understanding it correctly then may this will help you. Try to use apex:variable and then increment that variable in the apex:repeat like below:-

    <apex:variable var="rowNum" value="{!0}"/>
    <apex:pageBlockTable>
    <apex:column headerValue="No">
    <apex:variable var="rowNum" value="{!rowNum + 1}"/>
    {!rowNum}
    </apex:column>
    </apex:pageBlockTable>

     

    If this is not your requirement then please provide some more details and we can work on that accordingly.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Skip to toolbar