|
<e-grid-column field="CustomerID" headerText="Customer ID" filter=@(new { @operator="contains"}) width="120"></e-grid-column>
|
|
@{
List<object> cols = new List<object>();
cols.Add(new { field = "CustomerID", direction = "Ascending" });
}
@Html.EJS().Grid("Grid").AllowResizing().DataSource(ds =>
{
ds.Url(Url.Action("UrlDatasource", "Home"));
ds.Adaptor("UrlAdaptor");
}).AllowSorting().SortSettings(sort => sort.Columns(cols)).AllowFiltering().FilterSettings(filter => { filter.Type(Syncfusion.EJ2.Grids.FilterType.Menu); }).AllowPaging().PageSettings(page=> { page.PageSizes(true); }).Columns(col =>
{
col.Field("OrderID").HeaderText("Order ID").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add();
col.Field("ShipCountry").HeaderText("Ship Country").Filter(new { @operator = "contains" }).Width("120").Add();
}).Render()
|