title: Telerik grid custom binding: how should it look in 2014 (documentation seems to be outdated)
body: <p>I'm new to Telerik controls. I've read the documentation on <a href="http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-data-binding-custom-binding.html" rel="nofollow">Telerik grid custom binding</a> and tried to implement a sample application using it. The documentation seems to be outdated. But the most confusing thing is that if I understand correctly, some classes related to custom binding were removed/replaced, while other remain in the library:</p>
  
  <ul>
  <li><code>GridActionAttribute</code> now is not present in <code>Kendo.Mvc.dll</code></li>
  <li><code>GridModel</code> was removed.</li>
  <li><code>GridCommand</code> remains in place and not marked as obsolete. <strong>What for?</strong> It seems it can't be used without <code>GridModel</code> and <code>GridAttribute</code>, at least i couldn't make it working without them. There is a new class now <code>DataSourceRequest</code> which is a duplicate of <code>GridCommand</code> by internal structure, but different in usage.</li>
  <li>Extention method of Grid configuration <code>EnableCustomBinding(true)</code> is still in place, and it is not marked as obsolete. But my implementation of custom binding works equivalently with or without it. I'm not sure if my implementation is correct though =).</li>
  </ul>
  
  <p>Unfortunately I couldn't find any updated examples on the web - the majority was posted in 2011-2012 using approach with <code>GridActionAttribute</code>.</p>
  
  <p>Now, let me provide my implementation of custom binding. It is very simple and incomplete (just for example):</p>
  
  <pre><code>public ActionResult CustomGrid([DataSourceRequest] DataSourceRequest request)
  {
      return Json(new DataSourceResult {
                                           Data = GetPeople().Skip((request.Page - 1)*request.PageSize).Take(request.PageSize).Select(PersonToModel), 
                                           Total = GetPeople().Count()
                                       }, 
                  JsonRequestBehavior.AllowGet);
  }
  </code></pre>
  
  <p>So basically I've just made my own implementation of the <code>ToDataSourceResult</code> method. But this will allow me issuing custom requests to remote services now. It is working find for me. But is it a correct nowadays approach to custom bindings?</p>
  
  <p>As I said, calling <code>EnableCustomBinding(true)</code> on grid or missing it doesn't make any effect on the work of my example. So I'm a bit confused about this method too, if my implementation is correct.</p>
  
  <p><strong>To sum up, my questions are:</strong></p>
  
  <ol>
  <li>Is my implementation a correct way of making custom binding now? [<strong>Update</strong>: yes]</li>
  <li>If yes, why some old classes and methods of custom binding still exists and not marked as obsolete?</li>
  <li>Is there any updated documentation, or change notes? I see functionality is changing constantly and such questions probably will appear quite often. [<strong>Update</strong>: <a href="http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/custom-binding" rel="nofollow">here is an updated documentation]
  </a></li>
  </ol>
  
  <p><strong>UPDATE:</strong>
  My assumption was correct. I found an <a href="http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/custom-binding" rel="nofollow">updated documentation</a> on custom binding and it is described exactly as I assumed. So only 2nd question is active now.</p>