title: Implementing Search criteria using MVC return no record
body: <p>I am trying to implement search criteria which bind to Kendo Ui grid. However it return no record and no error display. In SearchProduct it return the data but it would not bind to grid</p>
  
  <p>Is there something i missed?</p>
  
  <p><strong>Controller code :</strong></p>
  
  <pre><code>[HttpPost]
  public ActionResult SearchProduct(ProductSearchCriteria criteria)
  {          
      string nameCriteria = string.Empty;
      string descCriteria = string.Empty;
  
      TTSEntities dc = new TTSEntities();
      if (!string.IsNullOrWhiteSpace(criteria.Name))
        nameCriteria = criteria.Name.ToLower().Trim();
  
      if (!string.IsNullOrWhiteSpace(criteria.Community))
        descCriteria = criteria.Desc.ToLower().Trim();
  
      var results = dc.Products.AsQueryable();
      if (criteria.Name!= null)
          results = results.Where(b =&gt; b.Name== criteria.Name);
  
      if (criteria.Desc!= null)
          results = results.Where(b =&gt; b.Desc== criteria.Desc);
  
      return PartialView("_ProductGrid", results.ToList());
  }
  </code></pre>
  
  <p><strong>Index.cshtml :</strong></p>
  
  <pre><code>@model HHIMS_Web_App.Models.ProductSearchCriteria
  
  @using (Html.BeginForm())
  {
      &lt;div id="headerpanel"&gt;
        &lt;fieldset&gt;
          &lt;legend style="font-size:14px"&gt;Search Criteria&lt;/legend&gt;
          &lt;div&gt;
              &lt;div class="editor-label"&gt;
                  @Html.LabelFor(model =&gt; model.Name)
              &lt;/div&gt;
              &lt;div class="editor-field"&gt;
                   @Html.EditorFor(model =&gt; model.Name)
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div&gt;
              &lt;div class="editor-label"&gt;
                  @Html.LabelFor(model =&gt; model.Desc)
              &lt;/div&gt;
              &lt;div class="editor-field"&gt;
                     @Html.EditorFor(model =&gt; model.Desc)
              &lt;/div&gt;
              &lt;div class="smallBox"&gt;
                  &lt;input type="button" value="Search" id="btnProductSearch" style="height:33px; font-size:14px; background-color:#3399FF" class="k-button" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/fieldset&gt;
    &lt;/div&gt;
  }
  
  &lt;script type="text/javascript"&gt;
  
      $(document).ready(function () {
  
          $('#btnProductSearch').click(function (e) {
              var searchParameters = GetSearchParameters();
              var jsonData = JSON.stringify(searchParameters, null, 2);
  
              $.ajax({
                  url: '@Url.Content("~/ProductDetails/SearchProduct/")',
                  type: 'POST',
                  data: jsonData,
                  datatype: 'html',
                  contentType: 'application/json; charset=utf-8',
                  success: function (data) {
                      $('#btnProductSearch').replaceWith(data);
                  },
                  error: function (request, status, err) {
                      alert(status);
                      alert(err);
                  }
              });
  
          });
  
          function GetSearchParameters() {
              var hrn = $("#Name").val();
              var community = $("#Desc").val();
  
              return { Name: name,
                  Desc: desc
              };
          }
      });
  
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>_ProductGrid View :</strong></p>
  
  <pre><code>&lt;div&gt;
      &lt;fieldset class="searchResults"&gt;
          &lt;legend style="font-size:14px"&gt;Search Result&lt;/legend&gt;
          &lt;br /&gt;
          &lt;div&gt;
            @(Html.Kendo().Grid&lt;TTP.Models.ProductModel&gt;()
  
                  .Name("Product")
                  .HtmlAttributes(new { @Style = "align:center; font-size:10px; width:500px" })
                  .Columns(columns =&gt;
                  {
  
                      columns.Bound(p =&gt; p.Name);
                      columns.Bound(p =&gt; p.Desc);
                  })
                  .AutoBind(false)
                  .Editable(editable =&gt; editable.Mode(GridEditMode.InLine))
                  .Sortable()
                      //.Pageable()
                  .Pageable(paging =&gt; paging
                      .Input(false)
                      .Numeric(true)
  
                      .PreviousNext(true)
                      .PageSizes(new int[] { 5, 10, 25, 50 })
                      .Refresh(false)
                  )
                  .Selectable()
                  .Scrollable()
                  .ColumnMenu(c =&gt; c.Columns(false))
                  .DataSource(dataSource =&gt; dataSource
                      .Ajax()//bind with Ajax instead server bind
                      .PageSize(10)
                      .ServerOperation(true)
                      .Model(model =&gt;
                        {
                          model.Id(p =&gt; p.Name);
                        }
                      )
                  )
              )
  
          &lt;/div&gt;
      &lt;/fieldset&gt;
  &lt;/div&gt;
  </code></pre>