title: How to auto select *all* items in dependent jQuery multiselect dropdown lists?
body: <blockquote>
    <p>My requirement is that when I select Customer ComboBox, I need to be
    able to auto-select all items in the dependent jquery multiselect
    dropdown lists. Following is what I started with. Thanks for
    suggestion/help !</p>
  </blockquote>
  
  <pre><code> This is Mvc View:
              &lt;td&gt;
                  @if(ViewBag.Customer != null)
                  {
                    @(
                       Html.Telerik().ComboBox()
                       .Name("ddlCustomer")
                       .BindTo((IEnumerable&lt;SelectListItem&gt;)ViewBag.Customer)
                       .ClientEvents(ce =&gt; ce.OnChange("ddlCustomer_OnChange"))
                     )
                  }
              &lt;/td&gt;
  
              &lt;td&gt;
                   @if (ViewBag.Service != null)
                   {
                     @Html.DropDownList("ddlService", (IEnumerable&lt;SelectListItem&gt;)ViewBag.Service, new { onchange = "ServiceChange()" })
                   }
              &lt;/td&gt;
  
              &lt;td&gt;
                  @if (ViewBag.Type != null)
                  {
                    @Html.DropDownList("ddlType", (IEnumerable&lt;SelectListItem&gt;)ViewBag.Type, new { onchange = "ComponentChange()" })
                  }
              &lt;/td&gt;
  
              &lt;td&gt;
                  @if (ViewBag.SubType != null)
                  {
                    @Html.DropDownList("ddlSubType", (IEnumerable&lt;SelectListItem&gt;)ViewBag.SubType)
                  }
              &lt;/td&gt;
  
      //.js file 
      function ddlCustomer_OnChange(){
          var goldCustomer = "Gold Customer";
          var ddlCustomerCombo = $(this).data('tComboBox');
          var selectedOption = ddlCustomerCombo.text();
  
          if (selectedOption == goldCustomer){
              //I want to get all items auto-selected in ddlService  
              $("#ddlService").multiselect("checkAll"); 
              //I want to get all items auto-selected in ddlType
              //which are based on all the checked items in #ddlService    
              $("#ddlType").multiselect("checkAll");
              //I want to get all items auto-selected in ddlSubType
              //which are based on all the checked items in #ddlType
              $("#ddlSubType").multiselect("checkAll");   
          }
      };
  </code></pre>
  
  <blockquote>
    <p>Above .multiselect("checkAll") for ddlType and ddlSubType is not working, even though ddlService is working.
    Any suggestion is appreciated. Thanks!!</p>
  </blockquote>