Is there any way to have sticky row selects

Is there any way to have sticky row selects

simoncunsimoncun Posts: 16Questions: 5Answers: 0

Hi,

I would like to be able to select a single row and only have it blur if I click on another row. At the minute if I click again on a selected row it will deselect it. Is there any way to do this? If not, is there a pre-deselect event?

This question has an accepted answers - jump to answer

Answers

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

    See this example.

    Allan

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

    Also, yes there is a deselect event, see the documentation here.

  • simoncunsimoncun Posts: 16Questions: 5Answers: 0
    edited August 2015

    Sorry, that's not quite what I'm looking for. I want single row selection but I want it so that if I click on an already selected row it doesn't deselect it. I can't use the deselect event as the row is already deselected when that's fired.

    i.e.

    1.Click once to select the row
    2.Click again on the row and have it remain selected.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Oh I see - thanks for the clarification. There isn't a built in mode for that, but you could easily use row().select() to perform that action with the API and a custom event handler.

    Allan

This discussion has been closed.