Id | Name | Surname | Marital status | Bolded age | Birthday | Employed |
---|---|---|---|---|---|---|
1 | Joe | Crosswave | Married | 36 | 1/5/1988 | False |
2 | Merry | Lisel | Widowed | 46 | 5/6/1978 | |
3 | Henry | Crux | Single | 34 | 11/19/1990 | True |
4 | Cody | Jurut | 54 | 8/11/1970 | False | |
5 | Simon | Scranton | Single | 39 | 10/10/1985 | |
6 | Leena | Laurent | Divorced | 24 | 7/1/2000 | False |
7 | Ode | Cosmides | Married | 58 | 4/17/1966 | True |
8 | Diandra | Mizner | Single | 25 | 8/20/1999 | False |
9 | Pete | Cassel | Married | 27 | 3/13/1997 | False |
10 | Nicky | Tremblay | Married | 36 | 1/5/1988 | True |
@model IQueryable<Person>
@(Html
.Grid(Model)
.Build(columns =>
{
columns.Add(model => model.Id).Css("collapse");
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("Bolded age").Css("bolded");
columns.Add(model => model.Birthday).Titled("Birthday").Formatted("{0:d}");
columns.Add(model => model.IsWorking).Titled("Employed");
})
)
<style>
.collapse {
display: none;
}
.bolded {
font-weight: bold;
}
</style>