Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Grid filtering in Javascript - Not Equal to null

$
0
0

You can use the workaround with grid's filterMenuInit event:

filterMenuInit: function(e) {
    if(e.field == "exportedDate"){
        varfilterButton = e.container.find("button:eq(0)");
        filterButton.click(function(){
            varfirstInputValue = e.container.find("input:eq(0)").val();
            if(firstInputValue === ""){
                varfilter  = e.sender.dataSource.filter();
                // remove the previous filter
                filter.filters = $.grep(filter.filters, function(f){
                    returnf.field === "exportedDate";
                }, true);
 
                varfirstValueDropDown = e.container.find("select:eq(0)").data("kendoDropDownList");
                filter.filters.push({ field: "exportedDate", operator: firstValueDropDown.value(), value: null});
                e.sender.dataSource.filter(filter);
                e.container.hide();
                returnfalse;
            }
        });
    }
}

Viewing all articles
Browse latest Browse all 84751

Trending Articles



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