When i deploy my code it gives me an error: saveRows is not a function So what's wrong ?
dataGrid.prototype = {
      display: function() {
        var self = this;
        var html = [];
        var check = 0;
        var lastSelection;
        html.push("<div style='margin-left:20px'>");
        html.push("<input class='btn btn-default' type='button' value='Save All Rows' onclick='saveRows()'' />");
        html.push("<table id='" + this.id + "" + "'class='table'>\n</table>");
        html.push("<div id='pagger_" + this.id + "'></div>");
        html.push("</div>");
        $('body').append(html.join(""));
        $("#" + this.id).jqGrid({
          // ...
        });
      },
      // ...
      saveRows: function() {
        var ids = $("#" + this.id).jqGrid('getDataIDs');
        for (var i = 0; i < ids.length; i++) {
          $("#" + this.id).jqGrid('saveRow', ids[i]);
        }
      }
    };
so any other suggestions ??