Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Kendo combobox can't get selected value of item

What I have tried:

JavaScript
@(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)
        
     }
Posted
Updated 8-Apr-16 1:21am
v2

1 solution

Try using and making it simple. I hope that works.
var combobox = $("#COMBOBOXNAME").data("kendoComboBox");
combobox.value();
combobox.text()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900