SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Has any one implemented a custom re-ordering logic similar to the one as seen on the view settings page of list/library which lets the user to specify the order of the columns.

I tried searching for the inbuilt JS function in MOSS but was unable to find any.

Appreciate any help!

share|improve this question
Let's all show our appreciation by upvoting helpful answers. There's five answers here, mostly from experts, and at the time I write this none of them have a single upvote. Just saying. – SPDoctor Aug 1 '11 at 8:58

You could probably implement custom order logic by modifying the XSLT of a dataviewwebpart in SharePoint Designer.

Are you able to give details of what kind of order logic you need?

share|improve this answer
I have a couple of custom columns to be displayed in a custom web part. I want to give the user ability able to set (via an application page) the order in which he wants to see the columns in the web part – Vivek Aug 27 '10 at 11:45

I tried to implement something like that in a web part, using the re-ordering from the /_layouts/formEdt.aspx page, similar to the one on the view page you looked at. The problem ended up being that it would do the re-order client side, then post the update to the server extensions url (owssvr.dll). That didn't play well with the custom web part editor i had.

At that point I abandoned that idea, and just did the field order as a simple comma separated list. It was easy to sell to stakeholders as the content query web part does the same.

share|improve this answer

I would use jQuery, as many people write things to sit on top of it (like this List reorder script). You'd obviously need to modify it to save your values. Please note that the component listed below doesn't create form items that will submit via a post/get so you would need to add that in yourself.

From a design perspective I would stick everything into a dropdown control and at worst, implement my own "move up / move down" logic which is then parsed on the server.

share|improve this answer

Re-ordering logic which you see in view settings page can be attached to a list for two purposes:

  1. to order list items
  2. to order columns of list

What kind of re-ordering are you expecting?

share|improve this answer
As i mentioned in the comments in response to James answer, I have a custom web part that displays some business information in combination of some fields. Now I want to give the user tha ability to arrange the order of these columns as displayed on the web part. – Vivek Sep 21 '10 at 5:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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