getAllfilters as URL parameters

Apr 14, 2014 at 11:19 AM
Edited Apr 16, 2014 at 8:55 AM
Bukharin, First of all thanks for such a great component.

Get all filters (in case of multiple filters) as url parameters string using javascript.

I have implemented getAllfitlers() as URL params. Add the following code to gridmvc.js
gridMvc.prototype.getAllfilters = function () {
        url = "";
        var filters = this.jqContainer.find(".grid-filter");
        for (var i = 0; i < filters.length; i++) {
            var filterData = this.parseFilterValues($(filters[i]).attr("data-filterdata"));
            if (filterData.length == 0) continue;
            if (url.length > 0) url += "&";
            url += $(filters[i]).attr("data-name") + "=" + encodeURIComponent(filterData[0].filterValue);
        }
        return url;
    };
Marked as answer by Qamaruddin on 4/16/2014 at 1:56 AM
Coordinator
Apr 16, 2014 at 3:20 AM
Hi,

All right.
Apr 16, 2014 at 8:55 AM
Thanks