This is a migrated thread and some comments may be shown as answers.

Combobox valuePrimitive not respecting auobind false?

1 Answer 115 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Leo
Top achievements
Rank 1
Leo asked on 01 Jun 2016, 06:41 PM

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)
)

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 03 Jun 2016, 08:29 AM
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
Tags
ComboBox
Asked by
Leo
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or