+ Start a Discussion

PageBlockTable column sort issue?



I developed a VF Page to mass edit records from UI using the standard controller and this is a list button. Here is my VF Page 

<apex:page standardController="Tier_Pricing__c" recordSetVar="unused" tabstyle="Tier_Pricing__c" sidebar="false">
    <apex:includeScript value="{!$Resource.UtilJS}" />
    <apex:form >
        <apex:pageBlock >
            <apex:pageMessages />            
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Return" action="{!cancel}"/>
            <apex:pageBlockTable value="{!Selected}" var="a" id="table">
                <apex:column headerValue="Name">
                    <apex:outputField value="{!a.name}"/>
                <apex:column headerValue="Price break Type">
                    <apex:outputField value="{!a.Price_Break_Type__c}"/>
                <apex:column headerValue="Tier Number">
                    <apex:outputField value="{!a.Tier_Number__c}"/>
                <apex:column headerValue="Value From">
                    <apex:outputField value="{!a.Value_From__c}"/>
                <apex:column headerValue="Value To">
                    <apex:outputField value="{!a.Value_To__c}"/>
                <apex:column headerValue="Agreement Price">
                    <apex:inputField value="{!a.Agreement_Price__c}"/>



This VF page works fine and  I can able to mass edit records at a time. But, when I select records and click the list button, the records are not sorted. So I want to sort the records by Tier Number in the page.



How can I implement this? 


Thanks in advance





Hi VPrakash,


Did you get anywhere with this request.  I am looking to do exactly the same using the same mass update app