kendo-dropdown

kendo ui select a specifix index/text during first load

大兔子大兔子 提交于 2019-12-04 10:16:43
The problem i am running into is that during the first load of the page i want to read the value from cookies if found, i want to change the theme that was stored in the cookie. not only want to change the them but i also want to select that item in the combo box so that it is in sync with the them that was applied. How can i select a specific item during initial page load, when i am constructing the combobox ? $(document).ready(function () { var initialized = false; // theme chooser drop-down var cmb=$(".themeChooser").kendoDropDownList({ dataSource: [ { text: "Default" }, { text: "BlueOpal"

how to get selected value for Kendo DropDownList

若如初见. 提交于 2019-12-04 05:14:31
I can't figure out how to determine which item is selected in the my kendo dropdownlist. My view defines it's model as: @model KendoApp.Models.SelectorViewModel The ViewModel is defined as: public class SelectorViewModel { //I want to set this to the selected item in the view //And use it to set the initial item in the DropDownList public int EncSelected { get; set; } //contains the list if items for the DropDownList //SelectionTypes contains an ID and Description public IEnumerable<SelectionTypes> ENCTypes } and in My view I have: @(Html.Kendo().DropDownList() .Name("EncounterTypes")

How to Get Dropdown's Selected Item's text in Kendo UI?

 ̄綄美尐妖づ 提交于 2019-12-03 10:37:31
问题 I am using Kendo UI Controls. I want to get the selected text of the dropdown list in jquery. I have used this syntax : $("#ddl").data("kendoDropDownList").text(); I am able to get the text in all browsers except IE. I don't know why this is not working in IE, please help me. Is there any other way to get selected Text ? 回答1: In order to get text value of a DropDownList use command as below : $("#ddl").data("kendoDropDownList").text(); 回答2: For DropDownLists, you include a DisplayText and a

Kendo DropDownList in Grid shows value after selection

时光怂恿深爱的人放手 提交于 2019-12-01 06:50:37
I'm trying to use a drop-down list in my grid. This is my grid definition: $("#grid").kendoGrid({ editable: true, dataSource: { data: data, schema: { model: { fields: { Name: { type: "string", editable: false }, FruitName: { type: "string" }, FruitID: { type: "number" } } } } }, columns: [{ field: "Name", title: "Name", width: 150 }, { field: "Fruit", title: "Fruit", width: 115, editor: renderDropDown, template: "#=FruitName#" }] }); And this is my editor function: function renderDropDown(container, options) { var dataSource = [ //{ name: "", id: null }, { FruitName: "Apple", FruitID: 1 }, {