Select All Rows, even those hidden
Select All Rows, even those hidden
Hi,
I put on each row of my table a check box. I make a button to select/unselect the current page.
Now, i want to make a button to select/unselect the entire table, but it seems the javascript doenst want to change the value of checkboxes that are not visible.
Is there a way to do what i want directly, or must i explore all pages and check all rows in the page i display?
Thanks for your time
I put on each row of my table a check box. I make a button to select/unselect the current page.
Now, i want to make a button to select/unselect the entire table, but it seems the javascript doenst want to change the value of checkboxes that are not visible.
Is there a way to do what i want directly, or must i explore all pages and check all rows in the page i display?
Thanks for your time
This discussion has been closed.
Replies
You can use the API function fnGetNodes() ( http://datatables.net/api#fnGetNodes ) to get an array of all TR elements which you can then do processing on. "$( "input", oTable.fnGetNodes() ).check(true)" for example (not sure if there is a 'check' jQuery function btw!!! Might be best to check that, but this is the general idea.
Allan
I complete it with this jquery function to check buttons :
jQuery( "input", oTablefnGetNodes() ).attr('checked', value)
Allan