2
votes

I was wondering if there is any way to have a Cascade kendo DropDownList (binded to Remote data) with client side filtering. I know that I can just use the change event of the master dropdownlist for the cascading effect and handle the case, but I wondered if there was a "kendo" way of handling this case. Possibly some parameter I could set that I have overlooked.

1

1 Answers

2
votes

I think this example would help :

category: <input id="category" />
product: <input id="product" />
var category = $("#category").kendoDropDownList({
    optionLabel: "Select category...",
    dataSource: [
        { CategoryID: 1, CategoryName: "Beverages" },
        { CategoryID: 2, CategoryName: "Condiments" },
        { CategoryID: 3, CategoryName: "Confections" }
    ],
    dataValueField: "CategoryID",
    dataTextField: "CategoryName"
}).data("kendoDropDownList");

var product = $("#product").kendoDropDownList({
    optionLabel: "Select product...",
    dataSource: [
        {"ProductID":35,"ProductName":"Steeleye Stout","CategoryID":1},
        {"ProductID":3,"ProductName":"Aniseed Syrup","CategoryID":2},
        {"ProductID":4,"ProductName":"Chef Anton's Cajun Seasoning","CategoryID":2},
        {"ProductID":5,"ProductName":"Chef Anton's Gumbo Mix","CategoryID":2},
        {"ProductID":6,"ProductName":"Grandma's Boysenberry Spread","CategoryID":2},
        {"ProductID":8,"ProductName":"Northwoods Cranberry Sauce","CategoryID":2},
        {"ProductID":16,"ProductName":"Pavlova","CategoryID":3},
        {"ProductID":19,"ProductName":"Teatime Chocolate Biscuits","CategoryID":3},
        {"ProductID":20,"ProductName":"Sir Rodney's Marmalade","CategoryID":3},
        {"ProductID":21,"ProductName":"Sir Rodney's Scones","CategoryID":3},
        {"ProductID":25,"ProductName":"NuNuCa Nuß-Nougat-Creme","CategoryID":3}                
    ],
    dataValueField: "ProductID",
    dataTextField: "ProductName",
    cascadeFrom: "category"
}).data("kendoDropDownList");