+ Start a Discussion

Line Numbers when outputting Line Items

When I run the apex:repeat on the VisualForce page, I want to output a number that increments as a line number just like in the image above.


This is the code I am using to implemnt it.  However, it's not incrementing.



public class QuoteExtension {
    public Integer Getcounter() {
         return Counter;

    public void Getincrementcounter() {

    Integer Counter = 0;

David VPDavid VP

Create a wrapper class for your object which has to properties : the number and your actual object itself.

Fill a list with those wrapper objects, each time setting the correct number and your objects.


Then you can display them with the correct number.





hey Scott,


Did you find a solution for this?. I am trying to avoid using a wrappe.