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

Possible to have cascading drop down lists from different editor files?

1 Answer 71 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 1
Ian asked on 03 Oct 2013, 09:56 AM
Hi

I want to have cascading drop down lists that are specified in different editor files and was wondering whether this was possible? So far I have not been able to get it working.

 --- ItemTypeEditor.cshtml
@using Kendo.Mvc.UI;
@model DataModels.Picking.PickingAssignmentItemType
 
@(Html.Kendo().DropDownList()
        .Name("Type")
        .DataTextField("Description")
        .DataValueField("TypeCode")
        .DataSource(source => source
            .Read("GetAssignmentTypes", "Picking")
            .ServerFiltering(true)           
        )
)

 -- ParentItemEditor.cshtml
@using Kendo.Mvc.UI;
@model DataModels.Picking.PickingAssignmentItemViewModel
 
@(Html.Kendo().DropDownList()
        .Name("ParentItem")
        .DataTextField("ItemId")
        .DataValueField("ItemId")       
        .DataSource(source =>
        {
            source.Read(read =>
            {
                read.Action("GetAssignmentKits", "Picking")
                    .Data("filterTypes");
            })
            .ServerFiltering(true);
        })
        .CascadeFrom("Type")
)  
 
<script>
    function filterTypes() {
        return {
            Type: $("#Type").val()
        };
    }
</script>
Can anyone see anything wrong with the above? Or determine whether a cascade is even possible across two different files?

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 07 Oct 2013, 06:55 AM
Hi Ian,

 
I already answered to this query in duplicated support ticket created by you - #743496. Please keep in mind that it is highly recommended that you keep related questions in one support thread or a forum post, so that we can easily keep track of your support history and provide better answers in a shorter time.

Kind Regards,
Vladimir Iliev
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
Ian
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or