Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@(Html.Kendo().Grid<Order>()
.Name("grid")
.DataSource(source =>
source.Custom()
.Type("odata-v4")
.Transport(transport => {
transport.Read(read =>
{
read.Url("http://services.odata.org/V4/Northwind/Northwind.svc/Orders");
});
})
.PageSize(10)
.ServerPaging(true)
.ServerFiltering(true)
)
.Pageable()
.Sortable()
.Selectable(sortable => sortable.Mode(GridSelectionMode.Single))
.Columns(columns =>
{
columns.Bound(c => c.OrderID).Title("Order");
columns.Bound(c => c.CustomerID).Title("Customer");
columns.Bound(c => c.ShipName).Title("Shipper");
columns.Bound(c => c.ShipCity).Title("City");
columns.Bound(c => c.ShipCountry).Title("Country");
columns.Bound(c => c.OrderDate).Title("Ordered");
columns.Bound(c => c.RequiredDate).Title("Required");
columns.Bound(c => c.ShippedDate).Title("Shipped");
})
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment