I am having a problem with a cascading dropdown child list will not populate
I am trying to implement a cascading dropdown, having problems with the Javascript to get the key value from selected parent...
Here is the code:
<script>
$(document).ready(function () {
var Region = $("#Region").data("kendoDropDownList")
});
function filtercountry()
{
return {
categories: $("#categories").val()
};
</script>
<div class="editor-field">
@(Html.Kendo().DropDownList()
.Name("Country")
.DataTextField("CountryName")
.DataValueField("CountryCode")
.HtmlAttributes(new { style = "width: 250px" })
.DataSource(dataSource =>
{
dataSource.Read(read =>
{
read.Action("GetCountries", "Location").Data("filtercountry");
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("Region")
)
</div>
I had a similar issue with Combox box and found the solution required a deeper layer of reference to control..., listed below
function DonAdditionalData()
{
var DM = $("#DManage").data("kendoComboBox");
DM2 = DM.input.val();
return
{
text:DM2
};
}
I am trying to implement a cascading dropdown, having problems with the Javascript to get the key value from selected parent...
Here is the code:
<script>
$(document).ready(function () {
var Region = $("#Region").data("kendoDropDownList")
});
function filtercountry()
{
return {
categories: $("#categories").val()
};
</script>
<div class="editor-field">
@(Html.Kendo().DropDownList()
.Name("Country")
.DataTextField("CountryName")
.DataValueField("CountryCode")
.HtmlAttributes(new { style = "width: 250px" })
.DataSource(dataSource =>
{
dataSource.Read(read =>
{
read.Action("GetCountries", "Location").Data("filtercountry");
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("Region")
)
</div>
I had a similar issue with Combox box and found the solution required a deeper layer of reference to control..., listed below
function DonAdditionalData()
{
var DM = $("#DManage").data("kendoComboBox");
DM2 = DM.input.val();
return
{
text:DM2
};
}