You need to sign in to do that
Don't have an account?
Filters in a 'pageBlockTable' using a custom controller
Hi, I'm creating a VF page, and I need to add 'filters' in a pageBlockTable, but I'm not using standarcontroller. Is possible to have filters in this case as shown in the image?
Please Help!
I have something like this:
<< Visual Force >>
<apex:pageBlockTable value='{!myObjectOpportunities}' var='opp'>
<apex:column headerValue='Opportunity Name'>
<apex:outputText value='{!opp.name}' />
</apex:column>
<apex:column headerValue='Stage'>
<apex:outputText value='{!opp.stageName}' />
</apex:column>
<apex:column headerValue='Probability'>
<apex:outputText value='{!opp.Probability} %' />
</apex:column>
<apex:column headerValue='Close Date'>
<apex:outputText value='{!opp.closeDate}'/>
</apex:column>
</apex:pageBlockTable>
<< Class >>
public Opportunity[] getMyObjectOpportunities() {
List<Opportunity> itemsOpportunities;
itemsOpportunities = [ SELECT o.Name, o.stageName, o.closeDate,o.Id, o.Probability FROM Opportunity o WHERE CreatedById =: getUserId() ];
return itemsOpportunities ;
}
Hi,
Please refer below post from Sam Arjmandi on sorting functionality on columns.
http://salesforcesource.blogspot.in/2008/11/adding-sorting-capability-to.html
Hope this helps.:)
All Answers
Hi,
Please refer below post from Sam Arjmandi on sorting functionality on columns.
http://salesforcesource.blogspot.in/2008/11/adding-sorting-capability-to.html
Hope this helps.:)
Perfect, thank you!