Table with radio buttons - first row un-checked
Table with radio buttons - first row un-checked
logart
Posts: 2Questions: 0Answers: 0
Here is the fiddle:
http://jsfiddle.net/HhQpF/
If you disable dataTables, all the rows have a default radio checked. Enabling dataTables, and the first row is un-checked.
Any ideas?
http://jsfiddle.net/HhQpF/
If you disable dataTables, all the rows have a default radio checked. Enabling dataTables, and the first row is un-checked.
Any ideas?
This discussion has been closed.
Replies
http://datatables.net/forums/discussion/14180
Steph
It is a similar issue but I am having this problem with zero-config.
By adding [code]"bAutoWidth": false[/code] it does resolve my issue. Should I report this as a bug?
Allan
Here is the quick solution to it.....
Basically, you need to set the Radio button as checked via JS/JQuery after the DataTable is Applied.
Below link is used for Extension of Demo
http://datatables.net/forums/discussion/14180
JQuery code
$(document).ready(function() {
$('#department_permissions_table').dataTable();
}
// code to set the value as checked.
jQuery("#deptartment_permission[2]").attr('checked', 'checked');
);
JS Code
radiobtn = document.getElementById("theid");
radiobtn.checked = true;