Trigering click on row when pagination is turned on

Trigering click on row when pagination is turned on

KruleKrule Posts: 3Questions: 0Answers: 0
edited August 2011 in General
I have a script that is supposed to trigger click on specific row according to GET param.

This works perfectly when I have no pagination. However when I turn pagination on, is there a way to:

1. *find the row based on row attribute*
2. *go to page where row is located*
3. trigger click on that row

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    You can do what you need using the API. You'll need a loop or two and a bit of logic of course, but the basic idea is:

    1. fnGetNodes() will give you an array of nodes which you can loop over and check for the attribute (jQuery can make this a one liner)

    2. There is a plug-in which will help with that: http://datatables.net/plug-ins/api#fnDisplayRow

    3. $(row).click();

    Allan
This discussion has been closed.