我已经搜遍了整个地方(轻描淡写),为我的案子解决方案直到现在都无济于事.首先,我将解释我的情景:
在发布一些代码之前,让我解释一下我的问题/难度.我有一个具有以下属性的实体:
有一个ForeignKey列设置为TipoTextoID属性,可以在内联或弹出模式下正确填充.但是,当涉及到更改数据时,它只能在线模式下工作.这是我的问题,我需要它在弹出窗口中工作,因为"Corpo"属性绑定到KEndoUI编辑器.
在弹出窗口中,它不会在下拉列表中显示正确的值,也不会在我们选择它时更改它.
老实说,我感觉很愚蠢.我试过几乎每一个样本,帖子,文章我都找不到用,我也很无能为力.
我希望有人可以帮助我.在此先感谢所有人!
所以,这是代码.风景:
@model IEnumerable<KendoMVC.CostSimulatorService.Texto>
@{
ViewBag.Title = "Textos";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Textos</h2>
@(Html.Kendo().Grid(Model) // Bind the grid to the Model property of the view
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Titulo); //Create a column bound to the "ProductID" property
//columns.Bound(p => p.IsPrivado).ClientTemplate("<input type='checkbox' #= IsPrivado ? checked='checked': '' # class='chkbx' />"); //Create a column bound to the "ProductName" property
columns.Template(@<text></text>).ClientTemplate("<input type='checkbox' #= IsPrivado …Run Code Online (Sandbox Code Playgroud)