Multiple row selection but with click handler restricted to a single column

Multiple row selection but with click handler restricted to a single column

rgvcorleyrgvcorley Posts: 29Questions: 0Answers: 0
edited February 2012 in TableTools
I have an editable table and I would like to use the "sRowSelect" : "multi" option, however because the cells are editable I would like to restrict the click handler for selecting a row to a single column (which I can have a checkbox in or something).

TableTools adds the click handler using jquery's live(), so I am try to remove this handler with the following:-

[code]$('tr').die('click');[/code]

But it's not having any effect. I've tried the other similar function [unbind() and the jq 1.7 recommended off()] but these don't work either. Also tried doing it with a timeout in case it was adding the handler before I was removing it, but still no joy.

Thanks in advance for any guidance/hints!

Replies

  • allanallan Posts: 61,821Questions: 1Answers: 10,125 Site admin
    I'm not sure why that isn't working to be honest - it certainly looks like it should!

    However, here is a method of achieving what you want with fnPreRowSelect: http://live.datatables.net/ataqon/edit .

    Hmmm - it is very odd about the die not working... I'll look into that a bit more.

    Allan
  • rgvcorleyrgvcorley Posts: 29Questions: 0Answers: 0
    That's absolutely spot on, you really thought of just about everything when designing this software!!

    I should have spotted the preRowSelect to be honest because I was looking at that method to see how the handler was attached!

    Thank you very much!
This discussion has been closed.