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

  • Home
  • SEARCH
  • 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 8961743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:57:54+00:00 2026-06-15T15:57:54+00:00

I am using datatable plugin in my ASP.Net MVC3 project. Here I have to

  • 0

I am using datatable plugin in my ASP.Net MVC3 project. Here I have to implement the
row reordering. I used “jQuery.dataTables.rowReordering.js” plugin to implement it. For ui its
working fine, but It failed to call server side function.

<script type="text/javascript">
    $(document).ready(function () {
        $('#myDataTable').dataTable().rowReordering({sURL: "/AdminArea/UpdateOrder" });
    });
</script>

my controller code is

public ActionResult Index()
 {
   return View(db.AdminAreas.ToList());
 }

public void UpdateOrder(int id, int fromPosition, int toPosition, string direction)
{
}

View

<table id="myDataTable">
<thead>
    <tr>
        <th>
            OrderNo
        </th>        
        <th>
            SubArea
        </th>
        <th>
            Description
        </th>        

    </tr>
</thead>
 <tbody>
@{
    if (@ViewData["SubAreaForArea"] != null)
    {
        IEnumerable<GridDragAndDrop.Models.SubAreaForAdmin> subarea = ViewData["SubAreaForArea"] as IEnumerable<GridDragAndDrop.Models.SubAreaForAdmin>;

        foreach (var item in subarea)
        {
            <tr class="order">
                <td>
                    @Html.DisplayFor(modelItem =>item.OrderNo)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.SubArea)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Description)
                </td>
            </tr>
        }
    }
}
</tbody>
</table>

I could not find the problem. So Please Help me to implement row drag and drop using
jquery. Also the updated order will be updated in the database.

  • 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-15T15:57:55+00:00Added an answer on June 15, 2026 at 3:57 pm

    You should change Updateorder function to

    public void UpdateOrder(int id, string fromPosition, string toPosition, string direction)
    

    because jQuery data table implements AJAX functionality with mime type ("text")

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

Sidebar

Related Questions

I am using the JQuery Datatables plugin in an ASP.NET MVC project to display
How can I implement jQuery DataTables plugin using C#, ASP.NET, SQL Server side processing
I have been using the DataTables plugin for jQuery (http://www.datatables.net) to search, sort and
I am using ASP.NET MVC3 with the jQuery Datatable plug in. I am having
I am using JQuery with the DataTable plugin, and now I have a big
I have started using the DataTables plugin (v1.6.2) for jQuery (v1.4.2), and I would
I'm using the jquery datatables plugin and I have two links in the first
I have a column with buttons in a table I'm using jQuery datatable plugin.
I am using the jquery datatable plugin. I have the following code that sets
I am using the jQuery plugin DataTables ( http://datatables.net ) for pagination, search capabilities

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.