Row reordering like Editor Generator

Row reordering like Editor Generator

kirisafarkirisafar Posts: 3Questions: 0Answers: 0
edited April 2013 in DataTables 1.9
Hi there,

I'm trying to implement row drag and drop in DataTables similar to the Generator where only one of the cells is draggable and it moves the whole row.

How did you manage to do it?

Thank you Allan.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Generator doesn't use DataTables, so it was much easier there.

    The thing to say about row ordering in DataTables is that it is entirely determined by the sorting applied to the table (so you cannot have both column sorting and click and drag sorting as that doesn't make sense). So to implement it you'd use the sorting aspect of DataTables - normally when I do it I use a hidden index column which is always sorted on.

    There is this plug-in, but it isn't maintained by myself (I'm not sure its maintained at all now), but it might give you something to start with: http://code.google.com/p/jquery-datatables-row-reordering/

    Allan
This discussion has been closed.