Have a feature where double clicking on one of the search result rows takes you to the page it is in

Have a feature where double clicking on one of the search result rows takes you to the page it is in

hm123hm123 Posts: 84Questions: 27Answers: 1

I wasn't able to find that this had been already asked, but I think it could be quite useful.

Right now search draws up its own list of results, yet sometimes we want to go to the page where that result came from and continue from there.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    How about something like this: http://live.datatables.net/wataqije/1/edit . It's using the row().show() plugin,

    Colin

  • hm123hm123 Posts: 84Questions: 27Answers: 1

    Hey, that works brilliantly Colin.

    But, why doesn't the documentation mention that clicking does this. It's not written out properly. At first I thought it was about showing the number of rows selected.

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    The documentation doesn’t say that the software does this, because it doesn’t. Colin has added a dblclick event listener in his code to trigger the call to the child row display. The key is that we provide an API that will make it possible for you to do things with DataTables, but sometimes the wiring of such actions needs to be done by your code.

    If you have any suggestions for how our docs can be improved, they would be warmly welcomed.

    Allan

  • hm123hm123 Posts: 84Questions: 27Answers: 1

    Sorry, my bad. Thank you for pointing that out. I'm afraid I didn't quite understand that from the plugin page where it said:

    See the row in datable by display the right pagination page
    This plugin permits to show the right page of DataTable to show the selected row
    Add an element to a huge table and go to the right pagination page

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Yeah, I think that was lost in translation. It just meant the plugin takes you to the page where that row is located. I've updated the docs so they're legible.

    Colin

Sign In or Register to comment.