RowReorder: Fixed rows?

RowReorder: Fixed rows?

oleonardoleonard Posts: 5Questions: 2Answers: 0

Is it possible to define a class of rows in a RowReorder'ed table which do not move?

Answers

  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin

    Not really I'm afraid. You could use rowReorder.selector to disallow some rows from being moved via click and drag themselves. But moving other rows around them would still cause those rows to shuffle with the rest. You can't lock the top three rows for example.

    Could you explain a little more about the use case perhaps?

    Allan

  • oleonardoleonard Posts: 5Questions: 2Answers: 0

    The situation is a table of library items which have been placed on hold for patrons. The holds can have their priority changed (the patrons' place on the waiting list). The holds which have been set aside but not yet checked out must be excluded from the set of rows which can be re-ordered.

  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin

    I'm with you now - thanks for the clarification. Indeed this is not something that DataTables currently does out of the box. You'd probably need to move the held items to a different table or reject a row reorder if it causes them to also be moved.

    Allan

This discussion has been closed.