"Sticky" select for select extension

"Sticky" select for select extension

LeftPinkieLeftPinkie Posts: 6Questions: 4Answers: 0

This is not really a technical issue. I am using the select extension with single style (single row only). My question is there an option to make the selection "sticky"? In other words, I do not want the row selection to toggle on subsequent clicks. I want it to act like the html form select tag... once selected it cannot be deselected unless another row / item is selected.

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Rather than using the built in Select "styles" I'd suggest using the API:

    $('#myTable').on( 'click', 'tbody tr', function () {
      table.row( this ).select();
    } );
    

    There isn't a sticky option built in, but that will do it :).

    Allan

This discussion has been closed.