You need to sign in to do that
Don't have an account?
Vijay Kumar Rebbala 1
How to display values in 4*7 format
//VFP: <apex:page controller="Accountlistctrl"> <apex:dataTable value="{!acctlist}" var="accs" columns="7" rows="{!rowcount}"> <apex:outputField value="{!accs.Id}"/> </apex:dataTable> </apex:page> //CTRL: public class Accountlistctrl { public list<Account> acctlist {get;set;} public Integer rowcount {get;set;} public Accountlistctrl(){ acctlist = [SELECT Id, Name FROM Account Limit 19]; integer s = acctlist.size(); system.debug('***********list size*************'+s); rowcount = Integer.valueOf(Math.ceil(s/7)); system.debug('***********rowcount*************'+rowcount); } }
I'm sorry, there's not really enough of a question here for us to try and help you with. Are you wanting to display a grid of something?
You might look at using one of the bootstrap on salesforce css systems to do a grid of boxes if thats what your looking for?
@ Vijay - You can follow whatever Kevin has suggested.An simple way to implement grid in VF page is to use Apex:panelGrid -
e.g.
This will result in
You can change 'columns' or 'rules' according to your reuirement.This is a simple example only.
Please let me know if it helps.
Regards,
Shashi