Kendodropdownlist成功方法

时间:2013-02-08 15:28:47

标签: kendo-ui

我有以下代码

    $("#categories").kendoDropDownList({
        dataTextField: "Name",
        dataValueField: "ID",
        dataSource: {
            serverFiltering: true,
            transport: {
                read: {
                    url: '@Url.Action("GetNames", "Index")',
                    dataType: "json",
                    type: "POST"
                }
            }
        }
    }).data("kendoDropDownList");

我需要在dropdownlist与数据绑定后执行一些代码。我怎样才能做到这一点。 感谢。

1 个答案:

答案 0 :(得分:0)

$("#categories").kendoDropDownList({
    dataTextField: "Name",
    dataValueField: "ID",
    dataSource: {
        serverFiltering: true,
        transport: {
            read: {
                url: '@Url.Action("GetNames", "Index")',
                dataType: "json",
                type: "POST"
            }
        }
    },
    dataBound: OnDataBound
    }).data("kendoDropDownList");

function OnDataBound() {
// do stuff
}