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
balraj singh 33balraj singh 33 

how can i implement below Sort functionality in my custom object

User-added image
Khan AnasKhan Anas (Salesforce Developers) 
Hi Balraj,

Greetings to you!

Please refer to the below links which might help you further with the above requirement.

https://blog.internetcreations.com/2011/12/using-salesforce-arrow-buttons-in-visualforce/#.W_-WRBMzbfY

https://developer.salesforce.com/forums/?id=906F0000000AsjqIAC

https://developer.salesforce.com/forums/?id=906F000000090ZBIAY

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
SandhyaSandhya (Salesforce Developers) 

Hi,

Below is the sample code.

<apex:page controller="sortController">
  <apex:form>
    <apex:selectList multiselect="false" size="10">
      <apex:selectOptions value="{!lineItems}" />
    </apex:selectList>
    <apex:commandButton action="{!moveTop}" value="Top" />
    <apex:commandButton action="{!moveUp}" value="Up" />
    <apex:commandButton action="{!moveDown}" value="Down" />
    <apex:commandButton action="{!moveBottom}" value="Bottom" />
    <apex:commandButton value="Save" action="{!save}" />
  </apex:form>
</apex:page>

https://developer.salesforce.com/forums/?id=906F000000092FhIAI
 
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya