+ Start a Discussion

how do i group my item in visualforce repeat?

i have a custom picklist field for quote line items to group them from 1~10 but how do i display them in VFP according to their group? I wanted to show something like:-

Group 1 [Group Description taken from Quote level]
Item_1 $100
Item_5 $100

Group 2 - [Group Description taken from Quote level]
Item_2 $100
Item_4 $100

[ungrouped item goes here]

seems like wrapper will be the way for this but i am very new to VFP developement, could anyone give me some guideline?


Amit Chaudhary 8Amit Chaudhary 8

An iteration component that allows you to output the contents of a collection according to a structure that you specify. The collection can include up to 1,000 items.
<!-- Page: -->

<apex:page controller="repeatCon" id="thePage">

    <apex:repeat value="{!strings}" var="string" id="theRepeat">

        <apex:outputText value="{!string}" id="theValue"/><br/>



/*** Controller: ***/

public class repeatCon {

    public String[] getStrings() {
        return new String[]{'$100','$100','THREE'};

Let us know if this will help you