최근에 Telerik Mvc에서 Kendo UI로 으로 웹 애플리케이션을 마이그레이션했는데 이후로 수정하는 방법이 너무 복잡하지 않은 걸림돌로 실행 중입니다. ' 지난 주에 Kendo UI에 대해 더 많이 배우고 익숙해졌습니다.다음 메소드 사이에서 호출이 모호합니다. - Kendo UI
다음은 내가 부딪히는 문제입니다. 에러 상태 :
The call is ambiguous between the following methods or
properties: 'System.Linq.Enumerable.Where<Model_OpenAccess_AssetMgr.Custody>
(System.Collections.Generic.IEnumerable<Model_OpenAccess_AssetMgr.Custody>,
System.Func<Model_OpenAccess_AssetMgr.Custody,bool>)'
and 'System.Linq.Enumerable.Where<Model_OpenAccess_AssetMgr.Custody>
(System.Collections.Generic.IEnumerable<Model_OpenAccess_AssetMgr.Custody>,
System.Func<Model_OpenAccess_AssetMgr.Custody,bool>)'
에러가 발생하는 코드는 아래와 같다 :
@model List<Model_OpenAccess_AssetMgr.Custody>
<div id="AssetDescription" class="detailContainer detailContainer3">
<header class="sectionheader" > Custodians </header>
@(Html.Kendo().Grid(Model.Where(x=>x.Active==true))
.Name("grd_Admin_Custodians")
.HtmlAttributes(new { @class = "ItemsGrid" })
.ToolBar(commands => commands.Create())
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(o => o.Custody_PK))
)
.DataSource(dataSource => dataSource
.Server()
.Read(read => read.Action("AdminHome", "Admin", new { view ="Custodies" }))
.Create("Create", "Admin", new { id = 0, view = "Custodies" })
.Update("Save", "Admin", new { view = "Custodies" })
.Destroy("Delete", "Admin", new { view = "Custodies" }))
.Columns(columns =>
{
columns.Bound(o => o.Custody_Name).Width(200);
columns.Bound(o => o.Custody_Dept).Width(150);
columns.Bound(o => o.Custody_eraider).Width(130);
columns.Bound(o => o.Custody_Type).Width(130);
columns.Bound(o => o.Custody_Email).Width(220);
{
commands.Edit();
commands.Destroy();
}).Width(210);
}
)
.Scrollable(scrolling => scrolling.Enabled(true)}
.Scrollable(scrolling => scrolling.Height(550))
.Pageable()
.Sortable()
)
</div>
)
(Model.Where (X => x.Active == TRUE) 신고되는 내용이다.
,163을 :지금, 나는 또한 상태
@model 목록 아래 상단에 나열 경고가
나는 내가 확신하고있는 오류와 상호 연결되어있다.
어떻게 든 Model.Where() 문을 수정해야합니까?
검도 UI 대신 사용해야하는 점은 무엇입니까?
또 다른 메모에서 MVC3에서 MVC3 으로 최근에이 웹 응용 프로그램 프로젝트를 업그레이드 했으므로이 작업과 관련이 있는지 여부는 알 수 없습니다. 그러나 저는 으로 가서 그 사실을 알려주기를 원했습니다.
다른 응답을 살펴 봤지만 아무도 검도 UI에 대해 구체적으로 질문하지 않았습니다.
감사합니다.
같은 읽기 방법 (=> read.Action ("보호 관리자"를 읽을 필요, "Admin")) 이 코드의 "..."부분 아래에 나열됩니다. 서버 측 렌더링과 Ajax 렌더링을 잘 혼합 할 수 있습니다. 그러나 이것이 사실이라면 문제를 해결하기 위해 내가 삭제하거나 수정하도록 제안합니다. 전체 코드가 포함 된 원래 게시물을 업데이트 했으므로 지금까지 작업 한 내용을 더 잘 이해할 수 있습니다. – Ogreintel