title: Adding External filters for Kendo UI Grid
body: <p>What i want to achieve is:</p>
  
  <ul>
  <li>Have a Master Grid. Clicking on a row of this grid, i want to filter the rows of the ChildGrid.</li>
  </ul>
  
  <p>What i have done so far:</p>
  
  <pre><code>function updateChildGridRows(field, operator, value) {    
  // get the kendoGrid element.
  var gridData = $("#childGrid").data("kendoGrid");
  var filterField = field;
  var filterValue = value;
  // get currently applied filters from the Grid.
  var currFilterObj = gridData.dataSource.filter();
  
  // if the oject we obtained above is null/undefined, set this to an empty array
  var currentFilters = currFilterObj ? currFilterObj.filters : [];
  
  // iterate over current filters array. if a filter for "filterField" is already
  // defined, remove it from the array
  // once an entry is removed, we stop looking at the rest of the array.
  if (currentFilters &amp;&amp; currentFilters.length &gt; 0) {
      for (var i = 0; i &lt; currentFilters.length; i++) {
          if (currentFilters[i].field == filterField) {
              currentFilters.splice(i, 1);
              break;
          }
      }
  }
  
  if (filterValue != "") {
      currentFilters.push({
          field: filterField,
          operator: "eq",
          value: filterValue
      });
  }
  
  gridData.dataSource.filter({
      filters: currentFilters
  }); }
  </code></pre>
  
  <p>I got this code from the following jsfiddle:</p>
  
  <p><a href="http://jsfiddle.net/randombw/27hTK/" rel="nofollow">http://jsfiddle.net/randombw/27hTK/</a></p>
  
  <p>I have attached the MasterGrid's Change event to MasterGridSelectionChange() method. From there i am calling my filter method.</p>
  
  <p>But when i click on the MasterGrid's row, all of the rows in my ChildGrid are getting removed.</p>
  
  <p>One thing i can understand is, if i give wrong column name in the filter list, all the rows will be removed. But even though i have given correct ColumnName, my rows are getting deleted.</p>
  
  <p>Sorry for the long post.</p>
  
  <p>Please help me with this issue, as i am stuck with this for almost 4 days!</p>
  
  <p>Thanks.</p>