How can I deactivate multi-row selection?

How can I deactivate multi-row selection?

jquijadojquijado Posts: 24Questions: 6Answers: 0

I have a table with editor and I want that an only row can be selected for editing or row, so the CTRL or SHIFT keys don't allow to select more than one only row.
Is this possible?

Thanks a lot everyone.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,836Questions: 1Answers: 10,518 Site admin
    Answer ✓

    Use select.style to control how the click interaction to select rows works.

    Allan

  • jquijadojquijado Posts: 24Questions: 6Answers: 0

    It works ok, but just if you use the select.style option AFTER select: true. Unless it doesn´t work and that is the reason why it didn't work for me. I'm going to write this in the page, since I think it's important to be careful about this.

    Thanks a lot, Allan.

  • allanallan Posts: 63,836Questions: 1Answers: 10,518 Site admin

    It works ok, but just if you use the select.style option AFTER select: true

    No it wouldn't. You can't have:

    {
      select: true,
      select: {
       style: "os"
      }
    }
    

    While it is valid Javascript, select can't be two different values at once! That would be like using:

    var i = 0;
    i = 1;
    

    and expecting i to be both 0 and 1.

    If you specify the select parameter as an object then it is assumed to be enabled.

    Allan

This discussion has been closed.