Quantcast
Viewing all articles
Browse latest Browse all 82127

Apply server side filters on click

Hello,

I am using your excellent plugin and have managed to get most functionality required with ease. One requirement outstanding is the ability to only apply filters once an "Apply Filters" button is clicked. I have it working by iterating through each of my filters and calling fnFilter

  $("#btnApplyFilters").click(function () {
          
            $("thead input[type=text]").each(function (i) {
                alert("about to add")
                oTable.fnFilter(this.value, $("thead input[type=text]").index(this));
                alert("added")
            });
            oTable.fnDraw();
        });

Unfortunately, the call to fnFilter causes an ajax call to repopulate the grid. So if the user is trying to apply 3 filters, each call to fnFilter will cause a call to the server.

Is there anyway i can apply all the filters in one go on a button click?

Many thanks,

Tom

Viewing all articles
Browse latest Browse all 82127

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>