This is a migrated thread and some comments may be shown as answers.

Cascading Dropdown, within TabStrip and Grid with Editor Template, popup...

1 Answer 134 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 21 Jun 2013, 08:10 PM
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
};
}

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 25 Jun 2013, 02:35 PM
Hello Michael,

To get the value of the ComboBox you need to use its value method.

For example:

$("#categories").data('kendoComboBox').value()


Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
DropDownList
Asked by
Michael
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or