Reset Column Filters (Select)
Reset Column Filters (Select)
Hi Allan!
First i have to congratulate you for this wonderful framework :)
Well my problem is when i use the filter columns selectable in a table with over 60 columns, some times reset all the filters is a big problem. Its posible use a button to reset the all selectable filters?
Thank you !
Regards
First i have to congratulate you for this wonderful framework :)
Well my problem is when i use the filter columns selectable in a table with over 60 columns, some times reset all the filters is a big problem. Its posible use a button to reset the all selectable filters?
Thank you !
Regards
This discussion has been closed.
Replies
if got you right then you might me needing this...fnFilterClear()
http://www.datatables.net/plug-ins/api
called this function on click of button...
Was too useful that code, but I have just 1 problem, all is working but i tryed to reset the select filter (without text on selector) but i dont get it.
Allan
[code]
$("input:button").click(function(e) {
$('#inputId').val(''); // reset the value to empty
});
[/code]
I got solve the problem with this jquery plugin called jquery.selectboxes.js
http://www.texotela.co.uk/code/jquery/select/
And the code was this
for the button
[code]function fnResetFilters()
{
var oTable = $('#example').dataTable();
/* Remove all filtering */
oTable.fnFilterClear();
$("select").selectOptions("");
}[/code]
The rest is the same in the api link that vivek put abobe
Regards