Default filter?

Default filter?

dougpdougp Posts: 2Questions: 0Answers: 0
edited January 2011 in General
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

Replies

  • 28.vivek.s28.vivek.s Posts: 69Questions: 0Answers: 0
    edited January 2011
    it's simple....
    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
  • dougpdougp Posts: 2Questions: 0Answers: 0
    Thank you, that did it!
This discussion has been closed.