Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Custom ordering a list of items from a database

  • 03-12-2008 03:27PM
    #1
    Registered Users, Registered Users 2 Posts: 21,278 ✭✭✭✭


    Hi all,

    I have a c# web-app that retrieves a list of items based on a category (numeric value in the table). These are currently ordered alphabetically by their title, as that's really the only meaningful mandatory field. The site owner would like to be able to sort these manually.

    I would say there would no more than 30 or so units in one category, but would like to make it reasonably scalable.

    I'm trying to figure out the best way to do this that is usable - and so far the only thing I can think of is a dedicated page for ordering them, with JavaScript that will move them up and down and do an update to each row, specifying the position in a new field. Or I could do it in AJAX, but if you want to bump a new property all the way to the top, it could be a lot of requests, so that doesn't make sense to me at the moment.

    Can anyone suggest a better alternative? I am wondering if any of the inbuilt data controls might be something I can use, but I'm not really that familiar with many of them.

    thanks,

    Eoin


Advertisement