@model IQueryable<Person>
@(Html
.Grid(Model)
.Build(columns =>
{
columns.Add(model => Html.CheckBox("Person_" + model.Id));
columns.Add(model => "<button data-id=\"" + model.Id + "\">Edit</button>").Encoded(false);
columns.Add(model => model.Name).Titled("Name");
columns.Add(model => model.Surname).Titled("Surname");
columns.Add(model => model.MaritalStatus).Titled("Marital status");
columns.Add(model => model.Age).Titled("Encoded age").RenderedAs(model => "<span>" + model.Age + "</span>");
columns.Add(model => model.Age).Titled("Not encoded age").Encoded(false).RenderedAs(model => "<span style='color: #CC4444'>" + model.Age + "</span>");
columns.Add(model => model.Birthday).Titled("Birthday").Formatted("{0:d}");
columns.Add(model => model.IsWorking).Titled("Employed");
})
)