You need to sign in to do that
Don't have an account?
Abhishek Sharma 527
checkbox in visualforce
Hello There, I have created visualforce page which returns account records, I need checkbox in the result page, can anyone plz guide how i can achieve that.
// my visualforce code
<apex:page controller="Demo2VF_Class">
<apex:form >
<apex:pageBlock title="Account information">
<apex:pageBlockTable value="{!acc}" var="item">
<apex:column value="{!item.id}"/>
<apex:column value="{!item.name}"/>
<apex:column value="{!item.Type}"/>
<apex:column value="{!item.rating}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
//my class code
public class Demo2VF_Class {
public List<Account> acc{get;set;}
public Demo2VF_Class(){
acc = [Select id, name, Type, Account.Rating from Account];
}
}
// my visualforce code
<apex:page controller="Demo2VF_Class">
<apex:form >
<apex:pageBlock title="Account information">
<apex:pageBlockTable value="{!acc}" var="item">
<apex:column value="{!item.id}"/>
<apex:column value="{!item.name}"/>
<apex:column value="{!item.Type}"/>
<apex:column value="{!item.rating}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
//my class code
public class Demo2VF_Class {
public List<Account> acc{get;set;}
public Demo2VF_Class(){
acc = [Select id, name, Type, Account.Rating from Account];
}
}
Please follow below url:-
https://www.infallibletechie.com/2014/08/how-to-create-checkboxes-in-visualforce.html
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh
can you plz advice on how to get this