【发布时间】:2014-07-30 18:04:28
【问题描述】:
我是 ASP.NET MVC Kendo UI 的新手。我正在使用 ASP.NET MVC 5。我想将 Name 列作为 Kendo UI 网格中的 HTML 链接。但是我收到一个错误,例如“'Kendo.Mvc.UI.Fluent.GridBoundColumnBuilder.ClientTemplate(string)' 的最佳重载方法匹配有一些无效参数”。 以下是我的代码。
@(Html.Kendo().Grid<Music.DataAccess.Models.Genre>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.Name).ClientTemplate(Html.ActionLink(c => c.Name, "Browse", new { genre = c.Name }));
columns.Bound(c => c.Description).Width(190);
})
.HtmlAttributes(new { style = "height: 380px;" })
.Scrollable()
.Groupable()
.Sortable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Genres_Read", "Store"))
)
)
这是我的流派模型
public class Genre
{
public int GenreId { get; set; }
[DisplayName("Genre Name")]
public string Name { get; set; }
public string Description { get; set; }
public List<Album> Albums { get; set; }
}
谁能帮帮我?
【问题讨论】:
标签: asp.net asp.net-mvc-4 kendo-ui kendo-grid kendo-asp.net-mvc