rstaib / jquery-bootgrid

Nice, sleek and intuitive. A grid control especially designed for bootstrap.
http://www.jquery-bootgrid.com
MIT License
973 stars 364 forks source link

resposehandler is not executing #401

Closed ARehmanMahi closed 2 years ago

ARehmanMahi commented 6 years ago
grid = $("#grid-data").bootgrid({
                rowCount: [50, 10, 25, -1],
                ajax: true,
                caseSensitive: false,
                columnSelection: false,
                post: function () {
                    th = $("th:visible");
                    col_names = [];

                    for (i = 1; i < th.length - 1; i++) {
                        col_names.push( th.eq(i).attr("data-column-id") );
                    }

                    return {
                        "col_names[]": col_names
                    };
                },
                responseHandler: function (data) {
                    var response = {
                        rows: data.rows,
                        current: data.current,
                        rowCount: data.rowCount,
                        total: data.total
                    };

                    //store result into a variable...
                    ajaxdata = data.rows;

                    return response;
                },
                url: "getdata",
            });