How can I add a custom sort order to items in a custom list?

I am building a publishing site with completely custom branding master pages and page layouts if that makes a difference.

--- UPDATE ---

I want to be able to create a custom list, for example - a list of home page slides for a carousel.

I then want to be able to give a content author the ability to sort those slides in a custom order - not by created date or alphabetically.

For example

Slide C Slide A Slide B Slide D Slide E

  • What you mean by custom . Pl elaborate.
    – variable
    Commented Aug 10, 2014 at 18:18

2 Answers 2


Does the sort have to happen on the fly? If not, I would create a sort-order column that contained a number value and expose it in a datasheet view so that your author can set it there, and have the default view sort by the sort column.


Another way to do this is:

Create a visual webpart. Use SPQuery to query the list of choice and display in gridview.

To control the sort order you can:

  1. Write code in web part to implement custom webpart property. Based on the choice of sort order the SPQuery can be dynamically updated to sort the results...

  2. Instead of custom property, provide a textbox on the webpart itself based on which you fire your SPQuery with sort order value fetched from this textbox.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.