Default filter?
Default filter?
Hi,
I've found some discussion of this already in the forum but nothing that directly helped out. Hopefully I'm missing something obvious.
How can I initialize the search table a filter option pre-selected?
We have a few states that we filter a certain column by, including a blank option. Selecting that removes the filter from that column.
I'd like to be able to filter by a certain value on a given column by default, and let the user have the option of changing that filter's value to a different value, or no value at all.
Thanks,
Doug
I've found some discussion of this already in the forum but nothing that directly helped out. Hopefully I'm missing something obvious.
How can I initialize the search table a filter option pre-selected?
We have a few states that we filter a certain column by, including a blank option. Selecting that removes the filter from that column.
I'd like to be able to filter by a certain value on a given column by default, and let the user have the option of changing that filter's value to a different value, or no value at all.
Thanks,
Doug
This discussion has been closed.
Replies
define your drop-down in like this
[code]one[/code]
then use jQuery and dataTable for rest of thing..in this way
[code]$(document).ready(function() {
var default= $('input:checkbox[name="default"]').val();
oTable.fnFilter(default,columnNo);
}):
[/code]
Regards,
Vivek