You need to sign in to do that
Don't have an account?

Apex repeat inside Apex PanelGrid
Hi there.
I am using an apex repeat component inside an apex panelGrid component.
Unfortunately, I read that using an apex repeat within a panelGrid will just render
evertything in a single panel grid cell which is not what I want.
I am trying to find a way to display my content, 3 entities across and once past 3,
the next entity moves to a new line.
<apex:panelGrid columns="3" width="100%"> <apex:repeat value="{!dataList}" var="interviewEntry"> <apex:panelGroup> <div class="img"> <a href="{!interviewEntry.communityLink}" class="highlightit"> <img src="{!interviewEntry.intervieweeImage}" class="imgId" /> </a> <div class="desc"> <apex:outputText value="{!interviewEntry.intervieweeName}" style="font-weight: bold; font-family:Verdana,Arial,Helvetica,sans-serif; font-size: 75%;" /> </div> </div> </apex:panelGroup> </apex:repeat> </apex:panelGrid> </apex:page>
Any ideas?
Thanks
Here is how i've done this using repeats and a table, i didn't use panelgrid
http://developer.force.com/codeshare/apex/ProjectPage?id=a0630000002ahp6AAA
http://code.google.com/p/visualforce-components/source/browse/trunk/CalendarSimple/src/unpackaged/components/calendar.component
This is wrapped in a table, the outter repeat goes for each week, the inner goes for each day of that week, as long as your inner list ( days for me) goes for the number of columns you want, then this method may work for you.
<apex:repeat value="{!weeks}" var="wk" id="foreachWeek"> <tr class="days"> <!-- or highlight --> <apex:repeat value="{!wk.days}" var="day" id="foreachday"> <td valign="top"><a class="calActive" href="/00U/c?md0=2008&md3={!day.dayOfYear}" target="_blank" title="Day View - {!day.date}">{!day.dayofmonth2}</a></td> </apex:repeat> </tr> </apex:repeat>
All Answers
Here is how i've done this using repeats and a table, i didn't use panelgrid
http://developer.force.com/codeshare/apex/ProjectPage?id=a0630000002ahp6AAA
http://code.google.com/p/visualforce-components/source/browse/trunk/CalendarSimple/src/unpackaged/components/calendar.component
This is wrapped in a table, the outter repeat goes for each week, the inner goes for each day of that week, as long as your inner list ( days for me) goes for the number of columns you want, then this method may work for you.
<apex:repeat value="{!weeks}" var="wk" id="foreachWeek"> <tr class="days"> <!-- or highlight --> <apex:repeat value="{!wk.days}" var="day" id="foreachday"> <td valign="top"><a class="calActive" href="/00U/c?md0=2008&md3={!day.dayOfYear}" target="_blank" title="Day View - {!day.date}">{!day.dayofmonth2}</a></td> </apex:repeat> </tr> </apex:repeat>
Great Idea Ron!
And thank you for sharing.
Much appreciated.
Regards