@model DataTable
@(Html
.Grid(Model.Rows.Cast<DataRow>())
.Build(columns =>
{
columns.Add(model => model["Name"] as String).Filterable(true).Sortable(true).Named("name").Titled("Name");
columns.Add(model => model["Surname"] as String).Filterable(true).Sortable(true).Named("surname").Titled("Surname");
columns.Add(model => model["MaritalStatus"] as String).Filterable(true).Sortable(true).Named("marital-status").Titled("Marital status");
columns.Add(model => model["Age"] as String).Filterable(true).Sortable(true).Named("age").Titled("Age");
columns.Add(model => model["Birthday"] as String).Filterable(true).Sortable(true).Named("birthday").Titled("Birthday");
columns.Add(model => model["IsWorking"] as String).Filterable(true).Sortable(true).Named("is-working").Titled("Is working");
})
.Empty("No data found")
.Pageable(pager =>
{
pager.RowsPerPage = 3;
})
)