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

How to display the record-1 in first column and record-2 in second column in pageblock table
<apex:page controller="StandardAccount" > <apex:form > <apex:pageBlock > <apex:pageBlockSection > <apex:inputText label="AccountName" value="{!name}"/> <apex:commandButton value="Search" action="{!search}"/> </apex:pageBlockSection> </apex:pageBlock> <apex:pageBlock > <apex:pageBlockTable value="{!accs}" var="a"> <apex:column > <apex:inputCheckbox/>{!a.name} <br/><br/> <apex:inputCheckbox/>{!a.phone}<br/><br/> <apex:inputCheckbox/>{!a.industry}<br/><br/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page> apex program: public class StandardAccount { public List<Account> accs{set;get;} public string Name {set;get;} public StandardAccount(){ accs=new List<Account>(); } public void search(){ accs=[select id,name,phone,industry from Account where name=:name]; } public class StandardAccountwrapper { public List<Account> acc{set;get;} public StandardAccountwrapper(){ acc=new List<Account>(); } } }
direct copy and paste this codeinto visualforce page and see the result.