RSSY
asked on
How do I select all table rows using a checkbox in the header using Jquery datatable tabletools?
New to JQuery.
Thanks.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.datatables.net/usage/columns
//On datatable init the options would look something like this
"aoColumns": [{ "sTitle": "<input type='checkbox' id='selectAll'></input>"}]
Then you could just wire up a handler to the header checkbox after the datatable is created to check/uncheck all the checkboxes;
So something like:
$("#selectAll").toggle(fun
$("checkboxSelector", dataTable.fnGetNodes()).at
, function () {
$("checkboxSelector", dataTable.fnGetNodes()).at
}
);