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

Cascading DropDownList in grid

1 Answer 171 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 25 Jul 2013, 03:42 PM
I am trying to implement cascading dropdown in kendo grid. Can someone please help me with the code.
Here is my editor code

@model ECRI.Phoenix.Core.ViewModels.EventResolutionViewModel

@(Html.Kendo().DropDownListFor(m => m)
.DataValueField("EventResolutionID")
.DataTextField("Resolution")
.Name("EventResolution")
// .BindTo((System.Collections.IEnumerable)ViewData["EventResolution"])
.DataSource(dataSource =>
{
dataSource.Read(read => read.Action("GetResolution", "CitationEvents").Data("filterResolution"))
.ServerFiltering(true);
})
.CascadeFrom("EventPriority")
.Enable(false)
.AutoBind(false)
)



<script type="text/javascript">
function filterResolution() {
//return EventOpenStatusID:{2}
// alert($("#EventPriority").val());
return {
EventOpenStatusID: $("#EventPriority").val()

};
}

</script>

it always thorws an error "filterResolution is undefined". I tried to return hardcoded value but it didn't help.

Thanks
Vandana

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 29 Jul 2013, 06:38 AM
Hello Greg,

Using cascading DropDownLists in Grid are covered in this code library article:

http://www.kendoui.com/code-library/mvc/grid/grid-inline-and-popup-editing-using-cascading-dropdownlists.aspx


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
Grid
Asked by
Greg
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or