Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8455565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:19:04+00:00 2026-06-10T12:19:04+00:00

I use a grid to show a list of master table records which are

  • 0

I use a grid to show a list of master table records which are used by a dropdown in my web app. We maintain a sortOrder column used when displaying the items in dropdown. I want to use the jQueryUI sortable plugin to allow the users to re-order the records being dispalyed in the Grid.

I’ve an ASP.Net MVC(v2.0) web app. What would be the best way to capture the new order and update it in the database?

I found a post for php that is similar. It uses the “.sortable(‘toArray’)” to get the elements but I’ve a Grid. Would I have to simplify my Grid to a list?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:19:06+00:00Added an answer on June 10, 2026 at 12:19 pm

    I’ve an editable Grid so I added a new column “sortOrder” which has textbox and each time the user drags a row I use the “update” event to find it and set “this.rowIndex”.

    Hope the following function helps –

    $("#sortable tbody").sortable({
        helper: fixHelper,
        cursor: 'move',
    
        update: function(e, ui) {
            $el = $(ui.item);
            $el.effect('highlight', {}, 2000);
    
            //Use for debug: alert($('#sortable tbody tr').length);
    
            $('#sortable tbody tr').each(
                    function(currentIndex) {
                        $(this).find('td:nth-child(3)').find('input:first').val(this.rowIndex); //td:first
                    });
        }
    });
    

    This is where I find my textbox and set its value:

    $(this).find(‘td:nth-child(3)’).find(‘input:first’).val(this.rowIndex);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a site which makes use of the popular 960.gs 16 column grid
i have simply tried to show the details by data grid make use of
I want to show a list of items in a grid(in a listbox ofc)
I use consomcontrols.grid on asp.net.I have a width problem specially on IE on page.
I use a grid view that gathers several check boxes. The grid view is
I'm trying to figure out why I would use a grid system. I have
I'm trying to use struts2-jquery grid plugin. When debugging my gridmodel is getting updated
I have a telerik grid with a dynamic data source (the grid may use
When i want to populate my grid I use this Select command : SELECT
in my first ExtJs4 project i use a editable grid with the feature rowbody

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.