title: Telerik MVC Grid client .dataBind() throwing exception
body: <p>When I try and call <a href="http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-client-api-and-events.html#dataBind" rel="nofollow">.dataBind()</a> on a Telerik Grid object in javascript, it throws an exception. The same code I'm using was working just fine with a previous version of the Telerik controls (2010.2.930) but since the update (using NuGet) to the latest version (2011.2.712), the code has broken.</p>
  
  <p>These are the various errors on different browsers.</p>
  
  <p><strong>Firefox 6:</strong> this.dataSource is undefined (telerik.grid.min.js - line 1)<br>
  <strong>Chrome 13:</strong> Uncaught TypeError: Cannot call method 'success' of undefined (telerik.grid.min.js:1)<br>
  <strong>IE 9:</strong> SCRIPT5007: Unable to get value of the property 'success': object is null or undefined (telerik.grid.min.js, line 1 character 25697)</p>
  
  <p>I have managed to create a very simple repo, all you need to do is put this in a fresh page:</p>
  
  <pre><code>&lt;div&gt;
      @(Html.Telerik().Grid(new List&lt;GridData&gt;())
          .Name("TestGrid")
          .Columns(column =&gt;
          {
              column.Bound(e =&gt; e.Name).Title("Name").Width("9em");
              column.Bound(e =&gt; e.Description).Title("Description").Width("9em");
          }))
  &lt;/div&gt;
  &lt;p&gt;
      &lt;a id="getData" href="#"&gt;Bind Data&lt;/a&gt;
  &lt;/p&gt;
  
  &lt;script type="text/javascript"&gt;
      (function ($) {
          $(document).ready(function () {
              $('#getData').click(bindGridData);
          });
      })(jQuery);
  
      var bindGridData = function() {
          var grid = $("#TestGrid").data("tGrid");
  
          var testData = [
              { Name: "Name 1", Description: "Description 1" },
              { Name: "Name 2", Description: "Description 2" }
          ];
  
          grid.dataBind(testData);
      };
  &lt;/script&gt;
  </code></pre>
  
  <p>The GridData class is just a simple POCO with Name and Description string properties.</p>