You need to sign in to do that
Don't have an account?
Bhm
records in visual force page
Hello,
My requirement is display records in visual force page side by side.
for example :
record1 record2
link link
record3 record4
link link
record5 record6
link link
Here link is a command link or output link. How to display records in visual force page?
Any one help me?
you need to create apex class, which contains a List of Data List<Object__c> and select in a Boucle For all the records here is a code that does this :)
Hi,
Simply use a <apex:panelGrid> will do.
Reference: http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_panelGrid.htm
-Hengky-
Hi,
Thanks for your reply. But the records will display in this format
rec1 Link
rec2 Link
rec3 Link
But using css is it possible how to apply?
Thank you
It might be easier if you can post your code.
-Hengky-
Hi
Am displaying my records using apex repeat.
<apex:form >
<apex:repeat value="{!reservations}" var="r">
<apex:outputlabel value="{!r.name}"/><br/><br/>
<apex:commandLink action="{!pdfpage}">
<apex:outputtext value="PRINT" styleClass="stybtn"/><br/><br/>
<apex:param name="opid" value="{!r.id}"/>
</apex:commandLink>
</apex:repeat>
</apex:form>
Thank you
Hi Bhm,
one solution to your issue is to create a list of list
You want 2 record in one row
Please use this code as reference
//APEX CODE
public List<List<Account>> acl{get;set;}
acl = new List<List<Account>>();
List<Account> al;
Integer i=0;
for(account acc: [select id,name from account limit 6]){
if(math.mod(i,2)==0){
al = new List<Account>();
al.add(acc);
}else{
al.add(acc);
acl.add(al);
}
i++;
}
//VF PAGE CODE
<table cellspacing="5" cellpadding="5" width="50%">
<apex:repeat value="{!acl}" var="a2">
<tr>
<apex:repeat value="{!a2}" var="a3">
<td>{!a3.Id}<br/>{!a3.Name}</td>
</apex:repeat>
</tr>
</apex:repeat>
</table>
I hope this answer you question
Please mark it as solved if it works for you.
KUDOS
Salesforce Developer, Salesforce Administrator