How to simulate dataset cursor ability on datatables?
How to simulate dataset cursor ability on datatables?
WDev
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.
This discussion has been closed.
Answers
What is a dataset cursor?
Allan
I think a handler to the current record (row of datatable) with navigation ability (first, prev, next, last).
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
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.
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.htmlAllan