title: jQuery Bootgrid sorting, pagination and search functionality not working
body: <p>I have a jQuery <code>bootgrid</code> implemented into my ASP.Net application which is filled using a <code>Generic Handler</code>.</p>
  
  <p>I fill the <code>bootgrid</code> using the <code>Generic Handler</code> as follows:</p>
  
  <pre><code>$(function () {
      var grid = $("#grid").bootgrid({
          ajax: true,
          ajaxSettings: {
              method: "GET",
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              cache: false
          },
          url: "/MyHandler.ashx",
          rowCount: [10, 50, 75, 100, 200, -1]
      });
  }
  </code></pre>
  
  <p>Here's <code>MyHandler.ashx</code> code:</p>
  
  <pre><code>public class RolesHandler : IHttpHandler
  {
  
      public void ProcessRequest(HttpContext context)
      {
          context.Response.ContentType = "text/json";
          context.Response.Write(GetData());
      }
  
      public bool IsReusable
      {
          get
          {
              return false;
          }
      }
  
      public string GetData()
      {
          var result = string.Empty;
          var con = new SqlConnection();
          var cmd = new SqlCommand();
          var dt = new DataTable();
          string sSQL = @"SELECT Id, Name
                          FROM dbo.AspNetRoles;";
  
          try
          {
              using (var connection = THF.Models.SQLConnectionManager.GetConnection())
              {
                  using (var command = new SqlCommand(sSQL, connection))
                  {
                      connection.Open();
                      command.CommandTimeout = 0;
                      var da = new SqlDataAdapter(command);
                      da.Fill(dt);
                  }
              }
  
              var sNumRows = dt.Rows.Count.ToString();
              var sDT = JsonConvert.SerializeObject(dt);
              result = "{ \"current\": 1, \"rowCount\": 10, \"rows\": " + sDT + ", \"total\": " + sNumRows + " }";
          }
          catch (Exception ex)
          {
          }
          finally
          {
              cmd.Dispose();
              THF.Models.SQLConnectionManager.CloseConn(con);
          }
  
          return result;
      }
  }
  </code></pre>
  
  <p>Basically all the important functionality of my bootgrid that worked before I implemented it the <code>ajax</code> way doesn't work anymore. Specifically the <code>ordering</code>, <code>searching</code> and <code>pagination</code> functionality aren't working at all without any errors.</p>
  
  <p>As far as I know from a bit of research. This is because every time a search phrase is made, or a header is clicked (for ordering) etc. The bootgrid performs an <code>ajax</code> call.</p>
  
  <p>Any idea on how to fix the functionality here?</p>