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

ComboBox column shows undefined value

1 Answer 170 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Minh
Top achievements
Rank 1
Minh asked on 12 Sep 2019, 04:52 AM

Hello,

My project has a problem about combobox column.

Then i follow your example about how to implement dropdownlist in grid control (https://demos.telerik.com/kendo-ui/grid/editing-custom) but i want to use combobox.

Unlucky, i get some problems and combobox shows "undefined" value after it lost focus.

I want send you a movie about it.

What should i do?

Here my movie: https://www.loom.com/share/02eab3b36cf74eb3b10f98c0af721404

Thanks.

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 13 Sep 2019, 12:42 PM

Hi,

 

In the custom editor example the Category column is bound to an object that contains an ID and Name. This, the values of the editor are mapped to use key-value pairs. However, when a custom text is entered by the user it is just a string value that does not have a corresponding ID that can be used by the ComboBox editor. 

In this scenario using a ComboBox would be suitable if the values in the column are just regular string values. Then you can set the valuePrimitive option of the ComboBox to true and the custom string would be applied as value in the column.

 

Regards,
Viktor Tachev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Minh
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or