我有以下网格。
@(Html.Kendo().Grid<Web.UI.ViewModels.CompanyViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.Name);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200);
})
.ToolBar(toolbar => toolbar.Create().Text("Add new company"))
.Editable(editable => editable.Mode(GridEditMode.PopUp))
.Pageable()
.Sortable()
.Scrollable()
.HtmlAttributes(new { style = "height:430px;" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Events(events => events.Error("error_handler"))
.Model(model =>
{
model.Id(p => p.ID);
model.Field(id => id.ID).DefaultValue(Guid.NewGuid());
})
.Create(update => update.Action("EditingPopup_Create", "Company"))
.Read(read => read.Action("EditingPopup_Read", "Company"))
.Update(update => update.Action("EditingPopup_Update", "Company"))
.Destroy(update => update.Action("EditingPopup_Destroy", "Company"))
)
)
当我使用此页面时,该应用程序托管在 Windows 服务器上,它会加载并且一切正常。
当应用程序托管在 Mono 服务器上时,当我尝试访问此页面时,该页面将失败。
我设法找到它失败的地方。
.Editable(editable => editable.Mode(GridEditMode.PopUp))
它告诉我
System.IO.FileNotFoundException
Could not load file or assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
如果你去,网格就可以了
.Editable()
所以肯定是跟弹窗功能有关。
任何人都知道它为什么会这样做?我需要能够使用弹出窗口编辑网格,因此仅将其更改.Editable()
为不是我正在寻找的解决方案。