How to make all checkboxes readonly?

How to make all checkboxes readonly?

jtr1812jtr1812 Posts: 11Questions: 4Answers: 0

Hi, the code below does exactly what I want which show/hide column based on condition and have all checkboxes selected. But now I also need to have those checkboxes as readonly meaning no one can disable/enable the checkboxes. Is it possible to do so? I have tried to target all checkboxes, inputs but I just can't find the right setting to work. Any help would be appreciated.

                      'initComplete': function(settings) {
                          var api = new $.fn.dataTable.Api( settings );
                          api.columns([3]).visible(condition);
                          this.api().rows().select();
                       }

By the way, I'm using checkbox from gyrocode.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,327Questions: 26Answers: 4,949
    Answer ✓

    Set the select.style to api if you don't want the end user to select or deselect rows.

    Kevin

This discussion has been closed.