How to simulate dataset cursor ability on datatables?

How to simulate dataset cursor ability on datatables?

WDevWDev Posts: 8Questions: 3Answers: 0

I've several tables on one page with one-to-one and one-to-many dependences. How can I simulate dataset cursor for each table? I want to get, store and set current row for each table.

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    What is a dataset cursor?

    Allan

  • WDevWDev Posts: 8Questions: 3Answers: 0

    I think a handler to the current record (row of datatable) with navigation ability (first, prev, next, last).

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    What current row of the DataTable? You can get the data for the rows which are displayed using the rows().data() method. Rarely is there only one row shown at a time though.

    Allan

  • WDevWDev Posts: 8Questions: 3Answers: 0
    edited November 2014

    OK. I mean something like examples/api/select_single_row. Initially selected row takes cursor. Then I want to navigate with Up and Down keys, store last cursor position and return to it as needed.
    May be fnScrollToRow with searching in table data will solve all my problems.

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    You could use fnGetSelectedRows() and then a little bit of jQuery to move to the next row. That is what I have done in this Editor example: http://editor.datatables.net/examples/api/backNext.html

    Allan

This discussion has been closed.