forked from DevExpress-Examples/devextreme-examples-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Index.cshtml
29 lines (27 loc) · 923 Bytes
/
Index.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@using ASP_NET_Core.Models
<h2>Home</h2>
@(Html.DevExtreme().DataGrid<SampleOrder>()
.ShowBorders(true)
.DataSource(d => d.Mvc().Controller("SampleData").LoadAction("Get").Key("OrderID"))
.Columns(columns => {
columns.AddFor(m => m.OrderID);
columns.AddFor(m => m.OrderDate);
columns.AddFor(m => m.CustomerName);
columns.AddFor(m => m.ShipCountry);
columns.AddFor(m => m.ShipCity);
})
.Paging(p => p.PageSize(10))
.FilterRow(f => f.Visible(true))
.HeaderFilter(f => f.Visible(true))
.GroupPanel(p => p.Visible(true))
.Grouping(g => g.AutoExpandAll(false))
.RemoteOperations(true)
.Summary(s => s
.TotalItems(totalItems => {
totalItems.AddFor(m => m.ShipCity).SummaryType(SummaryType.Count);
})
.GroupItems(groupItems => {
groupItems.Add().SummaryType(SummaryType.Count);
})
)
)