Hi,
I am implementing a cascading dropdown list slightly differently using my existing REST service. Let's say a user selected category 1 and I want to display all the products in the second dropdown menu. The following rest service will return all the products for category 1 .
myhost:8080/myapp/categories/1/products.json
Note that I hardcoded the '1'. How can I pass the selected category id to the middle of the read URL?
I am implementing a cascading dropdown list slightly differently using my existing REST service. Let's say a user selected category 1 and I want to display all the products in the second dropdown menu. The following rest service will return all the products for category 1 .
myhost:8080/myapp/categories/1/products.json
Note that I hardcoded the '1'. How can I pass the selected category id to the middle of the read URL?
$("#categories").kendoDropDownList({ optionLabel: "Select Category...", dataTextField: "name", dataValueField: "id", select: onSelect, dataSource: { //serverFiltering: true, transport: { read: "/myapp/categories" } }});var products = $("#products").kendoDropDownList({ autoBind: false, cascadeFrom: "categories", optionLabel: "Select product...", dataTextField: "name", dataValueField: "id", dataSource: { // serverFiltering: true, transport: {
//HARDCODED '1' SHOULD BE REPLACED WITH A SELECTED CATEGORY ID read: "/myapp/categories/1/products" } }}).data("kendoDropDownList");