jeudi 18 août 2016

How to get First column of Jquery Datatable as Checkbox

I have a requirement where I need to add the first column and its subsequent row values as Checked or Unchecked checkbox. The issue that I am facing as of now is one of dynamic data from the server side. Here, both column Name and Row Values are coming from the server side. Here is the code.

   $('#SettingsDatatable').dataTable({
   "order": [],
   "dom": "Bfrtip",
   "buttons": ["copy", "csv", "excel", "pdf", "print"],
   "columnDefs": [{
   "className": "dt-center", "orderable": false, "width": 20
                        }], 
  "columns": dataObject[0].columns,
   "data": dataObject[0].data
                    });

How can I add the checkbox column and how can it be checked and unchecked based on the value from dataObject[0].data? Please help. Thanks.




Aucun commentaire:

Enregistrer un commentaire