私はこの例では、役立つだろうと思う:私はおそらく私のデータソースがリモートデータにバインドされていること言及している必要があります
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");
。データソースには数百のアイテムがあり、最初からすべてをロードすることができないため、カスケード機能を使用します。 –