@model IEnumerable @{ var grid = new WebGrid(Model, rowsPerPage: 45); } @grid.GetHtml(columns: grid.Columns( grid.Column("LeafInputIdentifier", "Identifier"), grid.Column("LeafInputSiteId", "Site Id"), grid.Column("LeafInputName", "Submitted By"), grid.Column("CurrentStatus", "Status", item => statusFormat(item)), grid.Column("Chart", "Chart", item => chartLink(item)), grid.Column("Total Results: " + Model.Count(), format: item => btns(item))), htmlAttributes: new { @class = "table table-striped table-bordered table-hover table-condensed" } ) @helper btns(dynamic item) {
@Html.ActionLink("Details", "Details", new { id = item.LeafInputId }, new { @class = "btn btn-default btn-xs", role = "button" })
@Html.ActionLink("Delete", "Delete", new { id = item.LeafInputId }, new { @class = "btn btn-default btn-xs", role = "button" })
} @helper chartLink(dynamic item) { if (item.HasLeafChart) { Chart } } @helper statusFormat(dynamic item) { @item.CurrentStatus }