Select row problem

Select row problem

JovanJovan Posts: 16Questions: 0Answers: 0
edited September 2010 in General
I initialize my table and then make rows selectable and it works but only on first page. When I move on some other page, rows on them are not being selected. Actually nothing happens, I don't get any errors. Thanks

Replies

  • cdaiglecdaigle Posts: 57Questions: 0Answers: 0
    What event handler are you using?
    If you are binding the events, you lose them when the paging changes because the rows are redrawn.
    The quick way around this is to use $().live();.
    Alternatively, you can use the fnDrawCallback callback function (http://datatables.net/usage/callbacks) to re-apply binded events on each draw.

    If this is not your problem, you should post the code you used - it will make it easier to track down what the problem is.
  • JovanJovan Posts: 16Questions: 0Answers: 0
    I was using the code to mark row from the example from datatables.net
    but when I switch to second page it does not work. I putted this code into function and I called it throw fnDrawCallback as You suggested and it is working now,
    thanks
This discussion has been closed.