Combobox valuePrimitive not respecting auobind false?

2 posts, 0 answers
  1. Leo
    Leo avatar
    7 posts
    Member since:
    Jan 2016

    Posted 01 Jun Link to this post

    I stuggle with this grid and editortemplate with a combobox. My model has a int? idAfdeling that is the foreign key.

    With the valuePrimitive set to false, the idAfdeling remains null after a combobox item is selected, it will update once the initial idAfdeling is not null.

    With the valuePrimitive set to true, the idAfdeling is updated after selecting an item, but the autobind option is not respected and an ajax call is made.

     

    Now i wonder if there is any option to make the combination (combobox, nullable int, bind on demand) work..

    @(Html.Kendo().ComboBoxFor(m => m)
        .DataTextField("Omschrijving")
        .DataValueField("idAfdeling")
        .DataSource(ds =>
        {
            ds.Read(read => read.Action("Afdelingen", "Afdeling", new { Area = "Tabellen" }).Data("passAfdeling"));
        })
        .HeaderTemplateId("AfdelingHeaderTemplate")
        .TemplateId("AfdelingTemplate")
        .Suggest(true)
        .ValuePrimitive(false)
        .AutoBind(false)
    )

     

     

     

     

     

  2. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 03 Jun Link to this post

    Hi,

    This is not supported. What you can do is try the approach from the following article:
    http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/how-to/editing/grid-editing-with-combobox-remote-binding-and-filtering

    Regards,
    Bozhidar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top