Skip to content

Instantly share code, notes, and snippets.

@lohithgn
Last active July 26, 2016 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lohithgn/f32debbcab05e3e59c672308634c867a to your computer and use it in GitHub Desktop.
Save lohithgn/f32debbcab05e3e59c672308634c867a to your computer and use it in GitHub Desktop.
@(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