Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change/set value in kendo combobox

Can anyone let me know how can we change the value of kendo combobox dynamically.

Fiddle is here - http://jsfiddle.net/ashwyn/yL6w3/1/

In the above fiddle, when we click on click then the shown value should be changed to three (for eg.)

I found this link which list all datasource methods -
http://www.kendoui.com/documentation/framework/datasource/methods.aspx

like image 290
Ashwin Avatar asked Jul 03 '12 07:07

Ashwin


People also ask

How do I set default value in kendo ComboBox?

The selection can be set programmatically by calling the select() method on the widget instance. The following for example will set the selection to 'Thing1'. Finally, if you are using MVVM with declarative initialization, you can bind the selection to a value on a View Model.

How do I value my kendo ComboBox?

load("@Url. Action("Load", "Home")" + id); var selected = $('#typesCombo'). data('kendoComboBox'). val(); if (selected == '') { ... }

How do I get the selected text of kendo Dropdownlist?

$("#ddl"). data("kendoDropDownList"). text();

What is Kendo ComboBox?

The Kendo UI for Angular ComboBox is a form component that lets you choose from a list of options. It is a richer version of the <select> element and supports data binding, filtering, templates, and the entering of custom values.


1 Answers

If you know the value you want, you can also do:

$("#MyComboBox").data("kendoComboBox").value(id);
like image 134
user2493053 Avatar answered Sep 18 '22 08:09

user2493053