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

AngularJs simple dropdownlist

1 Answer 109 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Jakub
Top achievements
Rank 1
Jakub asked on 24 Nov 2015, 10:09 PM

Hello,

Iam trying to make to work simple dropdownlist. Here is a link to example:

http://dojo.telerik.com/EhiCa

 

I want to make it work so the value set to model on scope will be present in textbox of dropdownlist.

Why I need this? I got a form where user can input FirstName, to speed it up for user I have a table with FirstNames ( not having any id as each FirstName is unique ). I dont wnat to use any nested models or data-text-value fields etc. The dropdown needs to be filterable so basicly there can be a case where model have FirstName that doesnt exists in DropDown datasource ( as I filter it using server filtering ). Also I have to use ng-model instead of k-ng-model because I have validation that watches only ng-model.

 I tried many solutions but none of them worked. Is it possible what I am asking for?

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 25 Nov 2015, 11:59 AM
Hello Jakub,

I am afraid that selecting a value that will not exist in the DropDownList is not supported scenario and there is no workaround that could be suggested. As you could notice, if you set the "moze" value to be 'a' or 'b', the selection will work as expected:
$scope.cos = { moze: 'a' }

If any other questions arise on this matter, please feel free to contact us again.


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