title: Infragisitics Ignite UI grid and ajax
body: <p>I am trying to use the Ignite UI Grid with data returned from Ajax requests to my own service.  If I get all data back from a single request and use the JSON result as the datasource for the grid, that works fine.  What I really want is to be able to support paging, filtering and sorting all on the server but I am having a really hard time hooking up the igGrid to make the proper ajax requests.</p>
  
  <p>I have tried setting up my own ig.DataSource object with a url, and that will get called, but I do not seem to be able to specify the request as a "POST" instead of a "GET".  We currently use "POST" for all our ajax requests and pass parameters in the body of the request.  I have not figured out a way to do this using an ig.DataSource.</p>
  
  <p>I kind of expected the igDataSource to support a function with a callback, something like this:</p>
  
  <pre><code>$("#myGrid").igGrid({
  
  dataSource: function(data, callback) {
      $ajax({url: "/something",
      method: "POST", 
      data: {param1: ""}, 
      success: callback)
  }
  </code></pre>
  
  <p>that would just call a function and then handle a callback (similar to the way DataTables handle ajax requests.  There is also an ig.FunctionDataSource that I thought might work but that also doesn't seem to be what I need.  Looks like there is not really a callback for the ajax call to hook into.</p>
  
  <p>Has anyone else run into this or have a solution for this?  My only other option is try to find all the places where paging, filtering and sorting are done in the grid and handle events for each and make my own requests and refresh the grid.  I really like what the Ignite control provide out of the box for functionality but without the right server side support for this control I am not sure I want to use it.  There must be a better way to do this?</p>