title: Handling server filtering with Kendo ComboBox
body: <p>I'm trying to handle filtering of Kendo UI ComboBox on server side. I have the following codes in the view</p>
  
  <pre><code>$('#Solicitor').kendoComboBox({
      placeholder: "@T("Enter the partial Name or Primary ID of the Entity.").Text",
      dataTextField: "text",
      dataValueField: "id",
      autoBind: false,
      minLength: 3,
      filter: "startswith",
      dataSource: {
          serverFiltering: true,
          transport: {
              read: {
                  url: "@Url.Action("Index", "EntitiesAdmin", new { area = "BizNet.Entity"})",
                  dataType: "json"
              }
          }
      }
  });
  </code></pre>
  
  <p>When I typed something into the ComboBox, eg. <em>CAR</em>, using Fiddler2, i can see the following query string is being sent to the server</p>
  
  <pre><code>filter%5Blogic%5D=and&amp;filter%5Bfilters%5D%5B0%5D%5Bvalue%5D=CAR&amp;filter%5Bfilters%5D%5B0%5D%5Bfield%5D=text&amp;filter%5Bfilters%5D%5B0%5D%5Boperator%5D=startswith&amp;filter%5Bfilters%5D%5B0%5D%5BignoreCase%5D=true
  </code></pre>
  
  <p>when parsed, it'll look something like this</p>
  
  <pre><code>filter[logic]:and
  filter[filters][0][value]:CAR
  filter[filters][0][field]:text
  filter[filters][0][operator]:startswith
  filter[filters][0][ignoreCase]:true
  </code></pre>
  
  <p>From the looks of it, the ComboBox is sending a javascript array named <strong>filter</strong> through ajax to the server. How do I handle such array in my controller?</p>
  
  <pre><code>public ActionResult Index(THE_TYPE_TO_USE filter) {
  }
  </code></pre>
  
  <p>What should I put in <code>THE_TYPE_TO_USE</code>? I've tried <code>object</code> and <code>dynamic</code> but they both produced a null filter. Please note that the filter sent from the client can be complex too like the following:</p>
  
  <pre><code>$('#Solicitor').kendoComboBox({
      placeholder: "@T("Enter the partial Name or Primary ID of the Entity.").Text",
      dataTextField: "text",
      dataValueField: "id",
      autoBind: false,
      minLength: 3,
      filter: "startswith",
      dataSource: {
          serverFiltering: true,
          // Additional filters which span several levels deep
          filter: {
              filters: [
                  {
                      filter: {
                          logic: "or",
                          filters: [
                              { field: "content-type", operator: "eq", value: "Company" },
                              { field: "content-type", operator: "eq", value: "Firm" }
                          ]
                      }
                  }
              ]
          },
          transport: {
              read: {
                  url: "@Url.Action("Index", "EntitiesAdmin", new { area = "BizNet.Entity"})",
                  dataType: "json"
              }
          }
      }
  });
  </code></pre>
  
  <p>which will produce the following parsed query string</p>
  
  <pre><code>filter[filters][0][filter][logic]:or
  filter[filters][0][filter][filters][0][field]:content-type
  filter[filters][0][filter][filters][0][operator]:eq
  filter[filters][0][filter][filters][0][value]:Company
  filter[filters][0][filter][filters][1][field]:content-type
  filter[filters][0][filter][filters][1][operator]:eq
  filter[filters][0][filter][filters][1][value]:Firm
  filter[logic]:and
  filter[filters][1][value]:CAR
  filter[filters][1][field]:text
  filter[filters][1][operator]:startswith
  filter[filters][1][ignoreCase]:true
  </code></pre>
  
  <p>As you can see, the array can be several levels deep. So my question is, What should I put in <code>THE_TYPE_TO_USE</code> above which can handle complex filter of arbitrary depth? Can this only be done with the ASP.NET MVC Wrappers? If so, how?</p>