Re-sorting lines on the fly

Re-sorting lines on the fly

yusukeyusuke Posts: 4Questions: 0Answers: 0
edited February 2014 in Plug-ins
Hi

Just to be sure cause I already searched, there is no way currently to modify the order of the lines on the fly using DataTables?

I'd like to be able to take a line with my mouse, drag-drop elsewhere on the table, and send the data of the new order to the server in ajax; Like sortable() does in jQuery.

I didn't find any plug-in, but since I found mostly discussions about the ordering in JS, I wanted to be sure that i didn't miss a plu-in that does that.

Thanks :)

Replies

  • allanallan Posts: 63,602Questions: 1Answers: 10,486 Site admin
    Ordering in DataTables is determined by the sort that is applied to the table. If you want to allow drag and drop reordering, you'd need to disable sorting and enable something like jQuery UI's sortable as you mentioned.

    Allan
  • yusukeyusuke Posts: 4Questions: 0Answers: 0
    ok, so it's a no then, no sortable() -like in datatables

    thanks, i'll see if I'm capable of making a plug-in or a hack for this to work as I imagined

    thanks again
  • allanallan Posts: 63,602Questions: 1Answers: 10,486 Site admin
    Its perfectly possible - I've built such an option myself in the past (sorry - can't share as it was for a contract job), but there isn't a built in option for it.

    Allan
This discussion has been closed.