【发布时间】:2015-11-13 21:20:37
【问题描述】:
我已将我的剑道网格行设为可选,但在谷歌搜索后,我找不到任何显示如何使该行成为超链接的内容。我希望有人能够单击行上的任意位置并转到提供的 url。我尝试了行模板,但这打破了我的网格。这是在 asp.net MVC 中完成的。
@(Html.Kendo().Grid<EmployeeMasterView>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(e => e.EmployeePicture).ClientTemplate("<img src='" + Url.Content("~/Content/img/#: EmployeePicture#") + "' height='50px' width='50px' />").Title("Picture").Width(100);
columns.Bound(e => e.FirstName).Width(120).ClientTemplate("<a href='" + Url.Action("Index", "Employees", new {E="#: EmployeeID#" }) + "' >#: FirstName#</a>");
columns.Bound(e => e.LastName).Width(120);
columns.Bound(e => e.EmployeeID).Width(120);
columns.Bound(e => e.Email).Width(200);
columns.Bound(e => e.Department).Width(155);
columns.Bound(e => e.StrGender).Title("Gender").Hidden(true);
columns.Bound(e => e.BlnInactive).Title("Inactive").Hidden(true).ClientTemplate("<input type='checkbox' #= BlnInactive ? checked='checked' : '' # disabled='disabled'></input>");
})
.Sortable()
.Selectable()
.Scrollable()
.Groupable()
.ColumnMenu()
//.Pageable()
.Filterable()
.ClientDetailTemplateId("template")
.HtmlAttributes(new { style = "height:600px;" })
.Reorderable(reorder => reorder.Columns(true))
.Resizable(resize => resize.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
// .PageSize(10)
.Read(read => read.Action("DetailTemplate_Employees", "Employees"))
)
.Events(events => events.DataBound("dataBound"))
)
【问题讨论】:
标签: asp.net asp.net-mvc kendo-ui telerik kendo-grid