How to toggle a check box in a datatable ?

How to toggle a check box in a datatable ?

ln38ln38 Posts: 5Questions: 3Answers: 0

Hi!
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 ?
Thanks!

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

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

    Allan

Sign In or Register to comment.