title: How to filter a Kendo UI MVC grid using a dropdown list
body: <p>I have a kendo grid that is filtered by pushing values from a dropdownlist into the built in kendo filters. I can search the grid using the same method when I type values in a textbox and search. This is my kendo grid and the dropdown </p>
  
  <pre><code> @(Html.Kendo().DropDownListFor(model =&gt; model.MyObject.ID)
             .Name("Objects").DataTextField("Value").DataValueField("Key")
             .BindTo(@Model.MyObjectList).AutoBind(true)
             .HtmlAttributes(new { id = "selectedObject" })
   &lt;a class="button"  onclick="searchGrid()" id="search"&gt;Search&lt;/a&gt;                       
  
  @(Html.Kendo().Grid&lt;MyViewModel&gt;()
          .Name("MyGrid").HtmlAttributes(new { style = " overflow-x:scroll;" })
          .Columns(columns =&gt;
          {
             columns.Bound(a =&gt; a.MyObject.Name).Title("Field 1");
              columns.Bound(a =&gt; a.Column2).Title("Field 2");
          }
          .Pageable(page =&gt; page.PageSizes(true))
          .Scrollable(src =&gt; src.Height("auto"))
          .Sortable()
          .Filterable()
          .Reorderable(reorder =&gt; reorder.Columns(true))
          .ColumnMenu()
          .DataSource(dataSource =&gt; dataSource
              .Ajax()
              .PageSize(10)
          .Read(read =&gt; read.Action("GetList_Read", "MyController"))
          )
      )
  
    &lt;script&gt;
         function searchGrid()
         {
            selectedObject = $("#selectedObject").data("kendoDropDownList");
  
            gridFilter = = { filters: [] };
  
            if ($.trim(selectedRecipient).length &gt; 0) {
          gridListFilter.filters.push({ field: "Field 1", operator: "eq", value: selectedObject});
      }
          }
      var grid = $("#MyGrid").data("kendoGrid");
      grid.dataSource.filter(gridFilter);
    &lt;/script&gt;
  </code></pre>
  
  <p>My View model looks like</p>
  
  <pre><code> public class MyViewModel
   {
      public MyObject myObj {get;set;}
      public string Column2 {get;set;}
   }
  </code></pre>
  
  <p>The above function work when the search field is a textbox but it doesnt work when I am using a dropdown. I think it is because I am pushing the id of 'MyObject' into the grid filter while the grid is populated with the name of 'MyObject'. Can anyone show me how I can fix this. Thank you!!</p>