title: Telerik MVC Extension Grid: How to get filterBy JavaScript to work?
body: <p>Tried to research this the best I could, but couldn't find a basic example.  I have an ASP MVC 3 project with a Telerik Grid. Some of the columns of the grid are hidden because of space constraints.  There is a separate UI element that should allow the user to select filter values for all the columns, visible or hidden.  I know there must be a way to control the filtered contents of the grid from outside the View on the Client side - <a href="http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-client-api-and-events.html" rel="nofollow">this telerik help page</a> states:</p>
  
  <blockquote>
    <p>filterBy:</p>
    
    <p>Returns the current filter expression of the grid. The initial value is "" (empty string). Check the filter JavaScript method for additional reference.</p>
  </blockquote>
  
  <p>But I can't find the additional reference.  From what I can glean from the web I should do something like this:</p>
  
  <pre><code>var grid = $("#Grid").data("tGrid");
  
  grid.filter("OrderID~eq~10248");
  </code></pre>
  
  <p>But when it tries to execute I get the following JavaScript error:</p>
  
  <blockquote>
    <p>grid.filterBy is not a function</p>
  </blockquote>
  
  <p>What am I doing wrong?  And can someone point me  to the details of the filterBy method? </p>
  
  <p><strong>EDIT:</strong> </p>
  
  <p>I changed my code to:</p>
  
  <pre><code>$("#btnFilter").click(function (e) {
      var grid = $("#Grid").data("tGrid");
      grid.filter("Off_Plan~eq~'No Funds'");
  });
  </code></pre>
  
  <p>Still get the same kind of error:
      grid.filter is not a function</p>
  
  <p>Obviously I am newbie at telerik. Seems like I am missing some telerik javascript files...?  I started this Visual Studio project as a new Telerik MVC Application. The script registrar is there and I've added 
      
  to the _Layout.cshtml.  Groan...    </p>