This project is read-only.

getAllfilters as URL parameters

Apr 14, 2014 at 12:19 PM
Edited Apr 16, 2014 at 9: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
Apr 16, 2014 at 4:20 AM
Hi,

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