title: Loading values into a Kendo MVC Multiselect
body: <p>I am trying to preload my multiselect with values. I cannot seem to find an example of this that uses Ajax as the datasource. Here is my view code:</p>
  
  <pre><code>@(Html.Kendo().MultiSelectFor(model =&gt; model.CompanyIds)
      .Name("CompanyIds")
      .AutoClose(false)
      .AutoBind(false)
      .Placeholder("Select companies...")
      .DataTextField("CompanyName")
      .DataValueField("CompanyId")
      .DataSource(source =&gt;
      {
          source.Read(read =&gt;
          {
              read.Action("GetAvailableCompanies", "Admin");
          }).ServerFiltering(true);
      })
      .HtmlAttributes(new { @class = "form-control" })
  )
  </code></pre>
  
  <p>And here is my controller code:</p>
  
  <pre><code>    public ActionResult Portals()
      {
          var portals = new Portals();
          portals.GetBySqlStatement("SELECT * FROM Portal WHERE IsDeleted = 0");
          var adminPortals = portals.Select(portal =&gt; new Infrastructure.ViewModels.AdminPortal
          {
              PortalName = portal.PortalName,
              PortalId = portal.PortalId,
              CompanyIds = new List&lt;int&gt; { 1 }
          }).ToList();
  
          return View(adminPortals);
      }
  </code></pre>
  
  <p>Here is my <code>GetAvailableCompanies</code> method:</p>
  
  <pre><code>public virtual JsonResult GetAvailableCompanies([DataSourceRequest] DataSourceRequest request)
  {
      var companies = new Companys();
  
      companies.GetBySqlStatement("SELECT * FROM Company WHERE IsDeleted=0 ORDER BY CompanyName");
  
      return Json(companies, JsonRequestBehavior.AllowGet);
  }
  </code></pre>
  
  <p>I tried adding <code>.Value(new List&lt;int&gt; {1})</code> to the end of the multiselect, but it doesn't select it. I think the issue is that, because its Ajax, the value doesn't "yet exist" in the multiselect. Does anyone know the proper way to handle this? I tried looking for an event on the multiselect that executes after databinding, also with no luck.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>My view is using this model:</p>
  
  <pre><code>@model AdminPortal
  </code></pre>
  
  <p>and here is the class definition:</p>
  
  <pre><code>public class AdminPortal
  {
      public int PortalId { get; set; }
  
      [Display(Name = "Portal Name")]
      [Required(ErrorMessage = "Portal Name is required")]
      public string PortalName { get; set; }
  
      public List&lt;int&gt; CompanyIds { get; set; }
  }
  </code></pre>