Dropdown List not selecting initial value/text

2 posts, 0 answers
  1. Sam
    Sam avatar
    6 posts
    Member since:
    Jan 2015

    Posted 01 Apr 2015 Link to this post

    The following dropdownlist will not ever select any item except for the first (index 0):

      var clientList = HtmlExtensionMethods.GetClients().Select(c => new SelectListItem { Text = c.Value, Value = c.Key }).ToList();

     @(Html.Kendo().DropDownListFor(model => model.ClientID)
        .HtmlAttributes(new { @class = "select wfull" })

    I have tried removing the Value and Text methods and adding .SelectedIndex(2) which does not work either.  The model.ClientID is a value in the selectlistitem.  How in the world can I get this dropdown to select the item with the value from model.  Nothing seems to work.


  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    1968 posts

    Posted 03 Apr 2015 Link to this post

    Hello Sam,

    I attached a very similar project that should select by default the third item (Grey) in the drop down list. Please review the project and let us know how that worked.

    Boyan Dimitrov

    See What's Next in App Development. Register for TelerikNEXT.

Back to Top