本文介绍了如何在组合框中获取所选项目的datavaluefield?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Kendo组合框不能获得项目的选定值
我尝试过的方法:
Kendo combobox can't get selected value of item
What I have tried:
@(Html.Kendo().ComboBox()
.Name("ddl" + @Model.objDllColl[i].MCLELDescription.Split(' ') [0].ToString()) //@Model.objDllColl[i].MCLELDescription.Split(' ')[0].ToString()
.HtmlAttributes(new { style = "width: 200px;" })
.Events(e =>{ e.Select("filterProducts1");//.Open("onOpen"); })
.DataValueField("MCLECECode")
.DataTextField("MCLELDescription")
.DataSource(source =>{
source.Read(read => { read.Action("_Cluster", "Cluster", new { area = "" }) .Data("filterProducts");}) .ServerFiltering(true);})
.AutoBind(true)
.ToClientTemplate()
)
function filterProducts1(e) {
debugger
alert('ertera')
var CEDCode = this.dataItem(e.item.index()).ValueField; //this.dataItem(e.item.index()).ValueField
alert(CEDCode)
}
推荐答案
var combobox =
这篇关于如何在组合框中获取所选项目的datavaluefield?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!