title: Binding Telerik MVC Combobox to a model
body: <p>My application is asp.net MVC, trying to bind a Telerik MVC Combobox to a model.
  Here is the model:</p>
  
  <pre><code>public class Person
      {
          public int Id { get; set; }
          public string Name { get; set; }
          public bool DisplayBold { get; set; }
          public string Value
          {
              get
              {
                  return string.Format("{0}|{1}", this.Id, this.DisplayBold.ToString());
              }
          }
      }
  </code></pre>
  
  <p>In the controller:      </p>
  
  <pre><code>  var people = new List&lt;Person&gt;();
          people.Add(new Person { Id = 1, Name = "John Doe", DisplayBold = true });
          people.Add(new Person { Id = 2, Name = "Jayne Doe", DisplayBold = false });
          ViewData["people"] = people;
          return View();
  </code></pre>
  
  <p>I do get the values.</p>
  
  <p>In the view:</p>
  
  <pre><code>&lt;%= Html.Telerik().ComboBox()
         .Name("ComboBox")
             .BindTo((IEnumerable&lt;SelectListItem&gt;)ViewData["people"])
  %&gt;
  </code></pre>
  
  <p>I get the follwing error:</p>
  
  <pre><code>Unable to cast object of type 'System.Collections.Generic.List`1[caseprog.Models.Person]' to type 'System.Collections.Generic.IEnumerable`1[System.Web.Mvc.SelectListItem]'.
  </code></pre>
  
  <p>I would appreciate your suggestions.  Thanks in advance.</p>