from: http://stackoverflow.com/questions/4306683/how-to-make-a-mvc-3-webgrid-with-checkbox-column
@{
View.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
var usersGrid = new WebGrid(source: Model,
rowsPerPage: 40);
}
@usersGrid.GetHtml(
tableStyle: "grid",
headerStyle: "head",
alternatingRowStyle: "alt",
columns: usersGrid.Columns(
usersGrid.Column(format: (item) =>
Html.ActionLink("Edit", "Edit", new { id = item.Id})),
usersGrid.Column("Surname")
)
)
usersGrid.Column(format: (item) => Html.CheckBox("Id"))
0 意見:
張貼留言