function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VPrakashVPrakash 

PageBlockTable column sort issue?

Hello,

 

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:pageBlockButtons>
            <apex:pageBlockTable value="{!Selected}" var="a" id="table">
                <apex:column headerValue="Name">
                    <apex:outputField value="{!a.name}"/>
                </apex:column>
                <apex:column headerValue="Price break Type">
                    <apex:outputField value="{!a.Price_Break_Type__c}"/>
                </apex:column>                
                <apex:column headerValue="Tier Number">
                    <apex:outputField value="{!a.Tier_Number__c}"/>
                </apex:column> 
                <apex:column headerValue="Value From">
                    <apex:outputField value="{!a.Value_From__c}"/>
                </apex:column>
                <apex:column headerValue="Value To">
                    <apex:outputField value="{!a.Value_To__c}"/>
                </apex:column> 
                <apex:column headerValue="Agreement Price">
                    <apex:inputField value="{!a.Agreement_Price__c}"/>
                </apex:column>                               
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

 

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

 

VPrakash

 

MIKE_DAYMIKE_DAY

Hi VPrakash,

 

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

 

Mike