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

Selected Value problem.

2 Answers 77 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Adrien
Top achievements
Rank 1
Adrien asked on 16 Jul 2020, 05:41 PM

Hello.

I have a Combobox widget that loads a ton of data using paging. Each element of the combobox has a DisplayName and an Id property.

The DisplayName propery is displayed on the input (UI) as an element is selected, the ID is the value that we use on our application's logic.

The problem starts when I select a value that it's not in the first page and the save the data. When we open the widget again, the ID value is displayed on the UI until I scroll to through the combobox elements and it loads the selected value.

I'm guessing that the id property it's being displayed there because it's the only property saved by us and the DisplayName is not loaded yet.

 

Is there any way to get the selected element using the saved Id ?

2 Answers, 1 is accepted

Sort by
0
Adrien
Top achievements
Rank 1
answered on 17 Jul 2020, 02:11 PM

Hello there.

I've already solved the issue. If somebody is having the same problem, the valueMapper function fix this.

Here is the documentation:

https://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#value-mapping

 

0
Neli
Telerik team
answered on 20 Jul 2020, 09:26 AM

Hi Adrien,

I am glad that you have found a solution yourself. And thank you very much for sharing the article that helped you to resolve the issue as the information could be helpful to the other users in the future. 

As it is described in the documentation since R3 2016 release value mapper is required in scenarios where the ComboBox widget contains an initial value or in case the value method is used.

In case you need further assistance on the matter please do not hesitate to contact us.

Regards,
Neli
Progress Telerik

Tags
ComboBox
Asked by
Adrien
Top achievements
Rank 1
Answers by
Adrien
Top achievements
Rank 1
Neli
Telerik team
Share this question
or