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

soonic picture soonic · Sep 15, 2016 · Viewed 19.8k times · Source

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.

Answer

soonic picture soonic · Sep 15, 2016

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