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

DataTextField is being posted with Model instead of DataValueField

1 Answer 17 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 14 Jun 2017, 10:03 PM

This is strange because I am pretty sure this had been working in the past...

Have a ComboBox using ComboBoxFor with a model property.  Pretty basic config with server filtering.

On form the model property is being set to the DataTextField of the ComboBox. Shouldn't it be the DataValueField? The value is being set correctly when I add an alert to the onSelect event of the ComboBox and output the Value field.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 16 Jun 2017, 01:35 PM
Hello Todd,

I am attaching an MVC project, where a similar scenario to the one described is demonstrated.

With it, the DropDownList works as expected. Can you test it and verify if this is the required behavior on your end? If not, may I ask you to provide an isolated example which reproduces the issue faced? This way I will be able to provide you with further assistance. 

Regards,
Dimitar
Progress Telerik
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.
Tags
ComboBox
Asked by
Alex
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or