Mohsin Arif

Mohsin Arif

  • 284
  • 6k
  • 131k

How can i get checked row value ?

Jan 7 2020 11:13 PM
hello guys,
i have a datable checkbox, i wan on submit get the values of all checked rows, below is my code.
  1. function populatetbl(data) {  
  2.         tableName = $('#userTable').DataTable({  
  3.             "data": data,  
  4.             'columns': [  
  5.                 {  
  6.                     "render": function (data, type, row, meta) {  
  7.                         var checkbox = $("<input/>", {  
  8.                             "type": "checkbox"  
  9.                         });  
  10.                         if (row[2] === "enable") {  
  11.                             checkbox.attr("checked", "checked");  
  12.                             checkbox.addClass("checkbox_checked");  
  13.                         } else {  
  14.                             checkbox.removeAttr("checked");  
  15.                             checkbox.addClass("checkbox_unchecked");  
  16.                         }  
  17.                         return checkbox.prop("outerHTML")  
  18.                     }  
  19.                 },  
  20.                 {  
  21.                     "render": function (data, type, row, meta) {  
  22.                         return row[0];  
  23.                     }  
  24.                 },  
  25.                 {  
  26.                     "render": function (data, type, row, meta) {  
  27.                         return row[1];  
  28.                     }  
  29.                 }  
  30.             ],  
  31.             order: []  
  32.         });  
  33.     }  
 and want to get value of second coloum(Menu) attached piture. 
 
 

Answers (1)