Вот мой код для сетки:
Код: Выделить всё
@model CarsViewModel
@(
Html.Kendo().Grid(Model.Car)
.Name("car-grid")
.Columns(columns =>
{
//Columns
columns.Template(
$"
"
).Title("Model Number").Width(200);
})
.Scrollable(s => s.Enabled(true).Height("auto"))
.Sortable()
.Filterable()
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Pageable(p => p.PageSizes(true))
.ToolBar(toolbar =>
{
toolbar.Excel();
toolbar.Search();
})
.Excel(excel =>
{
excel.FileName($"{Model.Cars}.xlsx");
excel.AllPages(true);
}))
Код: Выделить всё
@model CarRowViewModel
----- Select -----
Подробнее здесь: https://stackoverflow.com/questions/786 ... from-a-par