DropDownListFor to model dont work

2 posts, 0 answers
  1. Vlad
    Vlad avatar
    1 posts
    Member since:
    Mar 2014

    Posted 10 Apr 2014 Link to this post

    public class OModel
    public IEnumerable<REF_OTRASLEVAYA_PRENADLEGNOST> RefOtraslevayaPrenadlegnost { get;set; }
    public int OTRASL_ID { get; set; }

    @model OModel
    @Html.Kendo().DropDownListFor(m => m.OTRASL_ID).Name("Otraslevaya").DataTextField("Text").DataValueField("Value").BindTo(Model.RefOtraslevayaPrenadlegnost)

    public ActionResult Update()
                return View(new OModel{RefOtraslevayaPrenadlegnost=dataManager.RefOtraslevayaPrenadlegnosts.GetRefOtraslevayaPrenadlegnosts());

            public ActionResult Update(Model model)
                      int i = model.OTRASL_ID   //  =0  ?????????????
                return View(model);

    when I select a value in DropDoschnListFor nazhimatyu and submit, then the selected value does not come to the server. Why?

  2. Georgi Krustev
    Georgi Krustev avatar
    3687 posts

    Posted 10 Apr 2014 Link to this post

    Hello Vlad,

    I would suggest you check the "Telerik UI for ASP.NET MVC Fundamentals" help topic to understand what is the difference between strongly-typed and non-strongly-typed extensions. Also a solution to the described issue can be found in this troubleshooting section.

    Georgi Krustev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. UI for ASP.NET AJAX banner
Back to Top