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

后端 未结 7 811
遥遥无期
遥遥无期 2021-02-05 02:05

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\")         


        
7条回答
  •  感情败类
    2021-02-05 02:42

    Here's another way:

    e.item[0].textContent
    

    Full example:

    $("#ancillaryTestDDL").kendoDropDownList({
        dataSource: that.viewModel.ancillaryTestDS,
        dataTextField: "DisplayValue",
        dataValueField: "Id",
        select: function (e) {
            console.log(e.item);
            console.log(e.item[0].textContent);
        }
    });
    

提交回复
热议问题