1

I'm currently using the Datatables Jquery Plugin to enhance an Html on a website I'm playing with.

I need to be able to use drag and drop to reorder the rows as well as be able to sort the columns in the data table by ascending or descending order.

However, this seems to indicate that you can only either have drag and drop OR sortable columns, not both at the same time using the DataTables jQuery plugin. http://jquery-datatables-row-reordering.googlecode.com/svn/trunk/index.html

Does anyone know a workaround to this? Or even another JQuery plugin or technique that would be better suited for my needs?

I'm new to jQuery and JS so any direction would be greatly appreciated

madth3
  • 7,275
  • 12
  • 50
  • 74
user1368448
  • 53
  • 2
  • 8

1 Answers1

3

At present the plugin you mentioned is the state of the art for datatables, you would need to build anything beyond what you've found yourself. I've been looking for something like this myself and the only thing I've found is jqGrid - look under 'new in version 3.6' > Sortable Rows:

http://trirand.com/blog/jqgrid/jqgrid.html

I prefer datatables, but this has an implementation that includes drag & drop and sorting columns.

Hopefully someone will implement this for real eventually.

One thing you could look into is using Tablesorter - which is much simpler than datatables - with a drag and drop plugin like sortable for jquery UI or this: http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/

Community
  • 1
  • 1
paul
  • 5,298
  • 2
  • 18
  • 23