Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bootstrap table with clickable row event and how to exclude a column or cell

I have this function for row click:

$("#table").on("click-row.bs.table", function (row, $el, field) {
  if (column != 4) {

  }
});

and what condition I could add which would exclude a specific column or cells in the column? I can't find under row, $el or field things which would identify for ex. a cell index.

like image 202
soonic Avatar asked Sep 15 '16 14:09

soonic


1 Answers

I've finally found the answer for my question (if somebody would need it, it's more simple then I thought):

 $("#table").on("click-cell.bs.table", function (field, value, row, $el) {
    if (value !="column_name"){
      //the code
    }
 });

here is an example (with the access to all the values of the clicked row): jsfiddle

like image 64
soonic Avatar answered Oct 23 '22 04:10

soonic