How to toggle a check box in a datatable ?

How to toggle a check box in a datatable ?

ln38ln38 Posts: 3Questions: 2Answers: 0

My datatable contains a checkbox in one column allowing to select the entire row.
I'm trying to toggle one of this checkbox programmatically (not using a mouse click).
I tried with:
$('#parametersTable tr:has(td)').find('input[type="checkbox"]').prop('checked', true);
and with:
parametersTable.rows(indexes).nodes().to$().find('input[type="checkbox"]').prop('checked', true);

(indexes is an array of index: [2, 5, 9] for example)

How can I do ?


  • allanallan Posts: 58,324Questions: 1Answers: 9,334 Site admin

    What you have looks about right. Can you provide a link to a test case showing the issue please?


Sign In or Register to comment.