Using arrow keys to traverse results

Using arrow keys to traverse results

austinbestaustinbest Posts: 4Questions: 0Answers: 0
edited February 2013 in General
Sorry if it has been asked, just link me to the correct discussion if so please. I asked this on StackOverflow as well, but no answers. Not sure if it has even been done...

Does anyone know of an addon to DataTables that will let you cycle the results list by using the arrow keys and select the highlighted row by using Enter instead of scrolling and clicking?

Basically after the datatable loads, search in the provided textbox, it filters the table, at that point currently you click on the row you want and can bind an onclick to open something based on the clicked row, i want that same end result except after i type in the search box, i want to just press the up/down arrow to traverse up/down the result list, once i have highlighted the one i want i can press enter and it have the same "click" effect.

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    edited February 2013
    There isn't a built in way of doing that, but there is no reason why you couldn't bind a key event listener to the arrow keys and then call the fnPageChange API method to change the page as needed. Something similar could be done for the row selection - if you are using TableTools, then the row selection API might be of use.

    Allan
This discussion has been closed.