簡體   English   中英

Kendo UI網格因Mono失敗

[英]Kendo UI Grid Failing with Mono

我有以下網格。

    @(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 Server上時,當我嘗試訪問該頁面時,該頁面將失敗。

我設法找到失敗的地方。

        .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()並不是我想要的解決方案。

使用Solution Explorer導航到您對該文件的引用,然后右鍵單擊它,然后打開“ Properties然后確保Copy Local設置為True我相信這可以解決您的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM