title: Passing parameters to telerik asp.net mvc grid
body: <p>I have a telerik asp.net mvc grid which needs to be populated based on the search criteria the user enters in separate text boxes. The grid is using ajax method to load itself initially as well as do paging. </p>
  
  <p>How can one pass the search parameters to the grid so that it sends those parameters "every time" it calls the ajax method in response to the user clicking on another page to go to the data on that page?</p>
  
  <p>I read the telerik's user guide but it does not mention this scenario. The only way I have been able to do above is by passing the parameters to the rebind() method on client side using jquery. The issue is that I am not sure if it is the "official" way of passing parameters which will always work even after updates.
  I found this method on this post on telerik's site: <a href="http://www.telerik.com/community/forums/aspnet-mvc/grid/grid-rebind-parameters.aspx" rel="noreferrer">link text</a> </p>
  
  <p>I have to pass in multiple parameters. The action method in the controller when called by the telerik grid runs the query again based on the search parameters.</p>
  
  <p>Here is a snippet of my code:</p>
  
  <pre><code>$("#searchButton").click(function() {
      var grid = $("#Invoices").data('tGrid');
  
      var startSearchDate = $("#StartDatePicker-input").val();
      var endSearchDate = $("#EndDatePicker-input").val();
  
      grid.rebind({ startSearchDate: startSearchDate ,
                      endSearchDate: endSearchDate
                  });
  });
  </code></pre>