…
$("#Grid").ejGrid({
…
allowFiltering: true,
filterSettings: { filterType: "excel" },
columns: [
{ field: "OrderID", isPrimaryKey: true, headerText: "Order ID", textAlign: ej.TextAlign.Right, width: 75 },
{ field: "CustomerID", filterType: "menu", headerText: "Customer ID", width: 120 },
]
});
}); |
[Index.cshtml]
@(Html.EJ().Grid<object>("Grid")
…
.AllowFiltering()
.FilterSettings(filter => { filter.FilterType(FilterType.Menu); })
.Columns(col =>
{
col.Field("Freight").HeaderText("Client Name").FilterType(FilterOption.Excel).Add();
})
) |