kendo-dropdown

Why Kendo DropDownList can not be initialized by json result from controller action

笑着哭i 提交于 2019-12-12 03:25:07
问题 I have a Kendo DropDownlist as follow <%= Html.Kendo().DropDownList() .Name("AssignDisciplineId") .DataSource(dataSource => { dataSource.Read(read => { read.Action("DisciplinesBySportAjax","Shared").Data("onDisciplinesBySportData"); }); }) .Events(events => events .Change("onAssignDisciplineComboChanged") ) .HtmlAttributes(new { style = "font-size:8pt;" }) %> function onDisciplinesBySportData(e) { var sportId = $('#AssignSportsId').data('kendoDropDownList').value(); return { sportId: sportId

Kendo MVVM Dropdown - How to set initial value based on other data?

ε祈祈猫儿з 提交于 2019-12-12 03:01:22
问题 I have the following html for a Kendo MVVM DropDownList: <select id="responseTypeDDL" data-role="dropdownlist" data-text-field="SystemResponseTypeCode" data-value-field="SystemResponseTypeId" data-bind="value: selectedSystemResponseTypeCode, source: responseTypes"> </select> This is my view model: SC.ViewModels.Reference.ResponseTypeDataSource.read(); var responseTypeDDL = kendo.observable({ responseTypes: SC.ViewModels.Reference.ResponseTypeDataSource, selectedSystemResponseTypeCode: null,

How to Pass Kendo DropDownList DataTextField value to Controller

喜你入骨 提交于 2019-12-12 02:58:07
问题 I have a Kendo DropDownList on the View and I want to pass its DataTextField value to the Controller and then pass and them on the labels in another View . Although I can pass DataValueField values to the Controller , I cannot pass DataTextField values. I tried to apply different scenarios but I could not. Any idea? On the other hand, if it is not possible, should the DataTextField values be populated again on the Controller and return to the other View ? View: @model IssueViewModel ... @Html

how can i make my kendo dropdown list live ? ?_?

别说谁变了你拦得住时间么 提交于 2019-12-11 06:01:29
问题 i have a kendo Dropdown list its working but i need to make it a live one without the button... whenever i pick one item inside the dropdown it automatically update whats inside my grid or the query on my grid base on the selected on the dropdown list. here's my code: @using (Html.BeginForm()) { <input type="hidden" id="hiddenUser" name="hiddenUser" value="@userId" /> <p> <input id="ddlWorker" name="ddlWorker" style="width: 250px;" value="@ddlWorker" />   <input type="submit" value="Filter

How to make my kendo dropdown list readonly?

妖精的绣舞 提交于 2019-12-11 05:19:58
问题 I have a dropdownlist and i need to make it read only when user opens the page.But it needs to be enabled after click on edit icon. 回答1: You can do the following: var dataSource = $("#dropdownElement").data("kendoDropDownList"); To make kendo dropdown read only: dataSource.readonly(); To remove read only to kendo dropdown: dataSource.enable(true); 来源: https://stackoverflow.com/questions/40521663/how-to-make-my-kendo-dropdown-list-readonly

DropDownList in kendo grid control (by ClientTemplate)

為{幸葍}努か 提交于 2019-12-11 03:28:44
问题 I need to make behavor for ClientTemplate like we have for EditorTemplateName. So I want to make something like this: Template: @( Html.Kendo().DropDownListFor(m => m) .BindTo((SelectList)ViewData["ExamResults"]) .Template("#:Value# #:Text#") .DataTextField("Text") .DataValueField("Value") .Events(e => e .Change("examResultOnDropDownChange") .Open("examResultOnOpen")) ) And adding column into grid: .EditorTemplateName("ExamResultGridForeignKey") but I want to: .ClientTemplate(

Adding a Dropdown inside Kendo Grid

邮差的信 提交于 2019-12-10 19:28:15
问题 I'm trying to add a DropDown inside kendo grid but it displays a TextBox @(Html.Kendo().Grid((IEnumerable<Doc.Web.Models.Vendor.DocumentsDetails>)Model.documents_lst) .Name("grid").Scrollable() .Columns(columns => { columns.Bound(o => o.DocumentRevisionID).Visible(false); columns.Bound(o => o.Documentnumber).Title("Document #").Width(150); columns.Bound(o => o.Revision).Title("Revision").Width(80); columns.Bound(o => o.RevisionDate).Format("{0:dd/MM/yyyy}").Title("Rev Date").Width(85);

Knockout-Kendo dropdownlist Ajax observableArray get selected item name

北慕城南 提交于 2019-12-10 10:26:57
问题 My application is MVC 5, I use the following Knockout-kendo dropdown list: <input data-bind="kendoDropDownList: { dataTextField: 'name', dataValueField: 'id', data: foodgroups, value: foodgroup }" /> var ViewModel = function () { var self = this; this.foodgroups = ko.observableArray([ { id: "1", name: "apple" }, { id: "2", name: "orange" }, { id: "3", name: "banana" } ]); var foodgroup = { name: self.name, id: self.id }; this.foodgroup = ko.observable(); ko.bindingHandlers.kendoDropDownList

how to get selected value for Kendo DropDownList

穿精又带淫゛_ 提交于 2019-12-06 00:09:51
问题 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

get selected id of kendo drop down value

有些话、适合烂在心里 提交于 2019-12-05 22:58:42
how to get id of selected name from dropdown. whene select Apples then got id 1 and select Oranges then 2 . this is simple kendo dropdown example. <body> <input id="dropdownlist" /> <script> $("#dropdownlist").kendoDropDownList({ dataSource: [ { id: 1, name: "Apples" }, { id: 2, name: "Oranges" } ], dataTextField: "name", dataValueField: "id", index: 1, select: onSelect }); function onSelect(e) { console.log(e); }; </script> </body> thanks. In order to retrieve the selected Id you can use the dataItem object and access the id within it with change event: var dataItem = e.sender.dataItem(); $('