Kendo ui 剑道网格内的级联下拉列表不工作
我有使用编辑器模板的级联下拉列表的剑道网格。这里的问题是当编辑下拉列表时显示为空白,但当单击下拉列表时,rest功能工作正常。请帮助我了解为什么会发生这种情况Kendo ui 剑道网格内的级联下拉列表不工作,kendo-ui,kendo-grid,kendo-asp.net-mvc,Kendo Ui,Kendo Grid,Kendo Asp.net Mvc,我有使用编辑器模板的级联下拉列表的剑道网格。这里的问题是当编辑下拉列表时显示为空白,但当单击下拉列表时,rest功能工作正常。请帮助我了解为什么会发生这种情况 @(Html.Kendo().Grid(Model.Locations) .Name("Grid") .HtmlAttributes(new {
@(Html.Kendo().Grid(Model.Locations)
.Name("Grid")
.HtmlAttributes(new { style = "min-height:400px" })
.Columns(columns =>
{
columns.Command(command => { command.Edit().HtmlAttributes(new { type = "button", @class = "btn btn-primary button" }); }).Width(100);
columns.Bound(p => p.LocationId).Width(140).Hidden(true);
columns.Bound(p => p.LocationName).Width(140);
columns.Bound(p => p.CountryId).EditorTemplateName("CountryNames").Title("CountryName").ClientTemplate("#:CountryName#").Width(150);
columns.Bound(p => p.StateId).EditorTemplateName("StateNames").Title("StateName").ClientTemplate("#:StateName#").Width(150);
columns.Bound(p => p.IsActive).Width(100);
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Navigatable()
.Sortable()
.Scrollable()
.Groupable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.ServerOperation(false)
.Events(events => { events.Error("error_handler"); events.RequestEnd("onRequestEnd"); })
.Model(model => { model.Id(p => p.LocationId); model.Field(p => p.LocationId).Editable(false); })
.Update(update => update.Action("Update_Location", "Administration"))
)
)
@using System.Collections
@model System.Int16?
@(Html.Kendo().DropDownList()
.Name("CountryId")
.AutoBind(false)
.DataTextField("CountryName")
.DataValueField("CountryId")
.DataSource(source =>
{
source.Read(read => { read.Action("", "").Data("filterState"); }).ServerFiltering(true);
})
.BindTo((IEnumerable)ViewData["Countries"])
)
<script>
function filterState() {
return {
countryId: $("#CountryId").val()
};
}
</script>
@model int?
@(Html.Kendo().DropDownList()
.Name("StateId")
.DataTextField("StateName")
.DataValueField("StateId")
.DataSource(source =>
{
source.Read(read => { read.Action("GetGridStateList", "Administration").Type(HttpVerbs.Post).Data("filterState"); }).ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("CountryId")
)
<script>
function filterState() {
debugger;
return {
countryId: $("#CountryId").val()
};
}
</script>
@(Html.Kendo().Grid(Model.Locations)
.名称(“网格”)
.HtmlAttributes(新的{style=“最小高度:400px”})
.列(列=>
{
Command(Command=>{Command.Edit().HtmlAttributes(新的{type=“button”,@class=“btn btn primary button”});}).Width(100);
columns.Bound(p=>p.LocationId).Width(140).Hidden(true);
columns.Bound(p=>p.LocationName).Width(140);
columns.Bound(p=>p.CountryId).EditorTemplateName(“CountryName”).Title(“CountryName”).ClientTemplate(“#:CountryName#”))。宽度(150);
columns.Bound(p=>p.StateId).EditorTemplateName(“StateNames”).Title(“StateName”).ClientTemplate(“#:StateName#”)).Width(150);
columns.Bound(p=>p.IsActive).Width(100);
})
.Editable(可编辑=>Editable.Mode(GridEditMode.InLine))
.Pageable()
.Navigatable()
.Sortable()
.Scrollable()
.Groupable()
.DataSource(DataSource=>DataSource
.Ajax()
.页面大小(20)
.ServerOperation(错误)
.Events(Events=>{Events.Error(“Error_handler”);Events.RequestEnd(“onRequestEnd”);})
.Model(Model=>{Model.Id(p=>p.LocationId);Model.Field(p=>p.LocationId).Editable(false);})
.Update(Update=>Update.Action(“更新位置”、“管理”))
)
)
@使用System.Collections
@modelsystem.Int16?
@(Html.Kendo().DropDownList())
.姓名(“CountryId”)
.AutoBind(假)
.DataTextField(“CountryName”)
.DataValueField(“CountryId”)
.DataSource(source=>
{
source.Read(Read=>{Read.Action(“,”).Data(“filterState”);}.ServerFiltering(true);
})
.BindTo((IEnumerable)视图数据[“国家”])
)
函数filterState(){
返回{
countryId:$(“#countryId”).val()
};
}
@模型int?
@(Html.Kendo().DropDownList())
.名称(“StateId”)
.DataTextField(“StateName”)
.DataValueField(“StateId”)
.DataSource(source=>
{
Read(Read=>{Read.Action(“GetGridStateList”,“Administration”).Type(HttpVerbs.Post).Data(“filterState”);}.ServerFiltering(true);
})
.Enable(false)
.AutoBind(假)
.CascadeFrom(“CountryId”)
)
函数filterState(){
调试器;
返回{
countryId:$(“#countryId”).val()
};
}
非常感谢在这方面的任何帮助……嗨,团队,有人能在这方面帮助我吗……没有人知道这个问题?非常感谢在这方面的任何帮助……嗨,团队,有人能在这方面帮助我吗……没有人知道这个问题?