jquery - Kendo UI combobox not setting item by value -


i have kendoautocomplete control on page.
has datavaluefield set "clientid" store in viewmodel.

when user selects desired client related agents , populate them kendocombobox has datavaluefield of "clientid".

if selected client agent automatically selected in combobox they'll agent if see mean.

i've tried number of things:

$("#agentlist").data("kendocombobox").select(viewmodel.get("newclientid")); 

this doesn't work.
testing purposes tried.

$("#agentlist").data("kendocombobox").select(0); 

this - selects first item in combobox that's not i'm after guess "select" method setting based on index.

i've tried using "value" so:

$("#agentlist").data("kendocombobox").value(viewmodel.get("newclientid")); , measure tried hard coding value i'm using:

$("#agentlist").data("kendocombobox").value(900224); 

none of these things producing desired outcome.
might version of kendo ui i'm using doesn't support this?
kendo ui plugin have outputs chrome's console version i'm using "2014.1.318".
, appreciated, thank you.

edit:

var searchname = viewmodel.get("searchname()"); combobox.select(function (dataitem) {     return dataitem.displayname === searchname; }); 

possibly not bullet proof appears working.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -