0

I am creating a jquery datatable as below

 var table = $('#example').DataTable({
  'ajax': 'https://gyrocode.github.io/files/jquery-datatables/arrays_id.json',
  'columnDefs': [
     {
        'targets': 0,
        'checkboxes': {
           'selectRow': true
        }
     }
  ],
  'select': {
     'style': 'multi'
  },
  'order': [[1, 'asc']]
   });

https://jsfiddle.net/4ovbtwgd/1/

But i have a requirement where i want to select/deselect row only based on checkbox click.Now the row will get selected if we click any of the column in a row.But based on requirement,the row should be selected/deselect based on checkbox click only.Can anyone help on this with a sample code

1 Answer 1

1

You can set selector inside select option like documentaion says:

select: {
  style:    'multi',
  selector: 'td:first-child'
},
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks..i will check

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.