O'Reilly logo

Bootstrap for ASP.NET MVC by Pieter van der Westhuizen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DataTables extensions

The jQuery DataTables plugin provides a wide variety of extensions, which can enhance the functionality of the plugin dramatically.

The ColReorder extension

The ColReorder extension allows users to reorder table columns by clicking-and-dragging the column header to the location they prefer. To enable column reordering for your DataTables HTML table, complete the following steps:

  1. Open the _Layout.cshtml file and add a reference to the dataTables.colReorder.css file:
    <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/colreorder/1.1.1/css/dataTables.colReorder.css">
  2. Open the view .cshtml file and add a reference to the DataTables, DataTables Bootstrap, and ColReorder extension JavaScript files:
    <script type="text/javascript" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required