jquery datatable checkall problem
jquery datatable checkall problem
Laith
Posts: 5Questions: 0Answers: 0
HTML
field
field
field
field
field
value
value
value
value
value
i'm trying to make the checkall checkbox selects all the checkboxs using this code
$('.checkall').click(function () {
var checkall =$(this).parents('.box:eq(0)').find(':checkbox').attr('checked', this.checked);
$.uniform.update(checkall);
});
as datatable shows the first 10,20,30 ... etc rows and removes the others from the DOM to do the pagination, this jquery code only selects the rows in the current page. so is there anyway that i can select all checkboxs ?
field
field
field
field
field
value
value
value
value
value
i'm trying to make the checkall checkbox selects all the checkboxs using this code
$('.checkall').click(function () {
var checkall =$(this).parents('.box:eq(0)').find(':checkbox').attr('checked', this.checked);
$.uniform.update(checkall);
});
as datatable shows the first 10,20,30 ... etc rows and removes the others from the DOM to do the pagination, this jquery code only selects the rows in the current page. so is there anyway that i can select all checkboxs ?
This discussion has been closed.
Replies
You want the API method fnGetNodes: http://datatables.net/api#fnGetNodes
[code]
$('.checkall', oTable.fnGetNodes()).click(function () {
[/code]
Allan
That was awesome it's 100% working now.
for multiple posts i couldn't post the topic using Chrome after clicking Submit button nothing happened. i'm using Chrome 12.0.742.91, windows 7. hope that i helped
i used firefox and it worked out.