title: Telerik MVC Grid Error
body: <p>Compiler Error Message: CS1977: Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type</p>
  
  <p>I am using the Respository pattern in this project, so the data i retrieved by way of service calls and not regular linq queries. I am unsure as to what they may mean by cast the arguement to a delegate or exp. tree type. here is the code.</p>
  
  <pre><code> @(Html.Telerik().Grid(Model)
      .Name("Grid").Columns(columns =&gt;
      {
          columns.Bound(o =&gt; o.formId).Width(100);
          columns.Bound(o =&gt; o.Name).Width(200);
          //columns.Bound(o =&gt; o.ShipAddress);
          //columns.Bound(o =&gt; o.OrderDate).Format("{0:MM/dd/yyyy}").Width(120);
      })
      .DataBinding(dataBinding =&gt; 
      {
          dataBinding.Server().Select("Index", "Grid", new { ajax = ViewData["ajax"] });
          dataBinding.Ajax().Select("_Index", "Grid").Enabled((bool)ViewData["ajax"]);
      })
              .Scrollable(scrolling =&gt; scrolling.Enabled((bool)ViewData["scrolling"]))
              .Sortable(sorting =&gt; sorting.Enabled((bool)ViewData["sorting"]))
              .Pageable(paging =&gt; paging.Enabled((bool)ViewData["paging"]))
              .Filterable(filtering =&gt; filtering.Enabled((bool)ViewData["filtering"]))
              .Groupable(grouping =&gt; grouping.Enabled((bool)ViewData["grouping"]))
              .Footer((bool)ViewData["showFooter"])
  </code></pre>
  
  <p>) </p>
  
  <pre><code>public ActionResult Index(bool? ajax, bool? scrolling, bool? paging, bool? filtering, bool? sorting,
          bool? grouping, bool? showFooter)
      {
          ViewData["ajax"] = ajax ?? true;
          ViewData["scrolling"] = scrolling ?? true;
          ViewData["paging"] = paging ?? true;
          ViewData["filtering"] = filtering ?? true;
          ViewData["grouping"] = grouping ?? true;
          ViewData["sorting"] = sorting ?? true;
          ViewData["showFooter"] = showFooter ?? true;
          return View(formService.GetForms());
      }
  
      [GridAction]
      public ActionResult _Index()
      {
          return View(new GridModel(formService.GetForms()));
      }
  </code></pre>