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

2 posts, 0 answers
  1. Michael
    Michael avatar
    5 posts
    Member since:
    Feb 2013

    Posted 21 Jun 2013 Link to this post

    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
    };
    }

  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 25 Jun 2013 Link to this post

    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!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top