Hi, I am using cascading dropdown list and trying to pass a parameter to the function that I am calling to get the data from DB. Below is my code, whenever this function is called it passes NULL. Anyone has any idea why?
var categories = $("#categories").kendoDropDownList({ optionLabel: "Select category...", dataTextField: "CategoryName", dataValueField: "CategoryID", dataSource: { type: "odata", serverFiltering: true, transport: { read: {
url: '@Url.Action("Getcategories")',
contentType: "application/json",
type: "GET"
} } } }).data("kendoDropDownList"); var products = $("#products").kendoDropDownList({ autoBind: false, cascadeFrom: "categories", optionLabel: "Select product...", dataTextField: "ProductName", dataValueField: "ProductID", dataSource: { type: "odata", serverFiltering: true, transport: { read: {
url: '@Url.Action("GetProduct")?Catid=' + $("#categories").val(),
contentType: "application/json",
type: "GET"
} } }).data("kendoDropDownList");