Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@(Html.Kendo().Grid<Order>()
.Name("grid")
@*...*@
.Filterable(filterable => filterable.Operators(operators =>
{
operators.ForDate(options =>
{
options.Clear();
options.IsGreaterThanOrEqualTo("From Date");
options.IsLessThanOrEqualTo("To Date");
});
}))
.Columns(columns =>
{
columns.Bound(c => c.OrderID).Title("Order").Filterable(false);
columns.Bound(c => c.CustomerID).Title("Customer").Filterable(false);
columns.Bound(c => c.ShipName).Title("Shipper").Filterable(false);
columns.Bound(c => c.ShipCity).Title("City").Filterable(false);
columns.Bound(c => c.ShipCountry).Title("Country").Filterable(false);
columns.Bound(c => c.OrderDate).Title("Ordered").Format("{0:MMM dd yyyy}");
columns.Bound(c => c.RequiredDate).Title("Required").Filterable(false).Format("{0:MMM dd yyyy}");
columns.Bound(c => c.ShippedDate).Title("Shipped").Filterable(false).Format("{0:MMM dd yyyy}");
})
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment