且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

KendoUI级联下拉列表,需要2个下拉列表中的值.

更新时间:2022-06-23 16:47:33

要在第三个DDL请求其数据时将第一个DDL的值与第二个DDL的值一起发送,您只需将此值添加到读取请求的strong>数据功能.

To send the value of the first DDL along with the value of the second DDL when the third DDL requests its data you just need to add this value to the Data function of the Read request.

例如

<script>
    function filterOrders() {
        return {
            categories: $("#categories").val(),
            products: $("#filterOrders").val()
        };
    }
</script>

还可以更改操作方法签名以增加一个参数

Also change the action method signature to have one more argument

public JsonResult GetCascadeOrders(string categories,string products)