You need to sign in to do that
Don't have an account?
Anusha518
How to filter the records based values chosen in the field
I have created a VF page which displays all the records(in a page block table) related to a custom object(Candidate).Above this table,I have created all the fields which are included as columns in the table. However,I need to create filters on the columns of this table to dynamically display the records based on the values chosen in the fields.(i,e) Suppose I have a pick-list called "Branch" which has values (CSE,IT,ECE,EEE). When ever I choose the value in the pick list on the VF page,It should display the table of records filetered by the value choosen in the pick list.. Can anyone help me out on how to implement this functionality?? Thanks!!!! Regards, Anusha
Use Record Types
Sorry i misinerputed your Question
Try some thing like below code
<apex:page standardController="account" recordSetVar="acc">
<apex:pageblock >
<apex:form >
view:<apex:selectList value="{!filterid}" size="1">
<apex:actionSupport event="onchange" rerender="list" status="list1"/>
<apex:selectOptions value="{!listviewoptions}">
</apex:selectOptions>
</apex:selectList>
</apex:form>
</apex:pageblock>
<apex:pageblock >
<apex:pageBlockSection >
<apex:outputpanel />
<apex:actionstatus id="list1" starttext="requsting.."/>
<apex:dataTable value="{!acc}" var="a" id="list" >
<apex:column >
<apex:facet name="header">Name</apex:facet>
{!a.name}</apex:column>
<apex:column >
<apex:facet name="header">Industry</apex:facet>
{!a.Industry}</apex:column>
</apex:dataTable>
</apex:pageBlockSection>
</apex:pageblock>
</apex:page>