Name | Surname | Marital status | Age | Birthday | Is working |
---|---|---|---|---|---|
Joe | Crosswave | Married | 32 | 1/5/1992 | False |
Merry | Lisel | Widowed | 42 | 5/6/1982 | |
Henry | Crux | Single | 30 | 11/19/1994 | True |
Cody | Jurut | 50 | 8/11/1974 | False |
@model DataTable
@(Html
.Grid(Model.Rows.Cast<DataRow>())
.Build(columns =>
{
foreach (DataColumn? column in Model.Columns)
{
String name = column!.ColumnName;
columns.Add(model => model[name] as String).Filterable(true).Sortable(true).Named(name).Titled(column.Caption);
}
})
.Empty("No data found")
.Pageable(pager =>
{
pager.RowsPerPage = 4;
})
)