DropDownListForin Custom Editor not selecting optionLabel

3 posts, 0 answers
  1. Sam
    Sam avatar
    13 posts
    Member since:
    Aug 2015

    Posted 29 Mar Link to this post

    I have an MVC KendoGrid with a custom popup editor that contains 3 select lists using razor DropDownListFor html helpers.  I am using the optionLabel parameter on the helper to show "-- Select One --" empty option when creating a new record, but it is not being selected for 2 selects that have integer values. The other select that has a string type for value in the model is showing the "-- Select One --" corrrectly.  Is there something I can do to have it selected in all 3 dropdown lists for new records?
  2. Sam
    Sam avatar
    13 posts
    Member since:
    Aug 2015

    Posted 30 Mar Link to this post

    Also, when I take the form outside of the grid custom editor template and put it in a view of its own and supply the same model, the dropdown lists behave as expected selecting the 0 index for all 3 dropdown lists
  3. Pavlina
    Admin
    Pavlina avatar
    6154 posts

    Posted 31 Mar Link to this post

    Hi,

    Please refer to the forum threads below where a similar question is disscused: 
    http://www.telerik.com/forums/inline-add---not-getting-dropdown-default-value#XZ4azeBieU29g-Wg2JXU9A
    http://www.telerik.com/forums/grid-add-edit-popup-not-defaulting-dropdown

    Give the suggestions there a try and let us know in case you need additional assistance.

    Regards,
    Pavlina
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top