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

Handling Active and Inactive list items

1 Answer 41 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 09 Mar 2015, 07:14 PM
 I have a list (db table) of contacts. Let's say there are 5000 contacts in the table.  200 flagged active and the reminder flagged inactive.   I'm using a combo box to select/change the contact on a screen that edits an activity.  This all works great.  Since I don't want have all 5000 contacts transferred to the dom I'm filtering the for only active contacts.  This also works great.   The problem comes when the edit screen loads and contact has been marked as inactive.  In this case I get the value instead of the name.  Has anyone solved for this case?

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 11 Mar 2015, 10:13 AM
Hello Mark,

The ComboBox displays the value as a text on load, because it considers it as a custom one. In other words, when source is loaded and the current selected value is not there then it will be considered as a custom one. If you would like to avoid this behavior, then you will need to set the selected value and text using the corresponding value and text options. Here is a Dojo demo (http://dojo.telerik.com/@ggkrustev/AQudA) that demonstrates this approach.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
ComboBox
Asked by
Mark
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or