BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
@{
List<object> filterColumns = new List<object>();
filterColumns.Add(new { field = "EmployeeID", matchCase = false, @operator = "notequal", predicate = "and", value = 4 });
filterColumns.Add(new { field = "ShippedDate", matchCase = false, @operator = "notequal", predicate = "and", value = (DateTime?)null });
}
@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.DataSource).AllowFiltering(true).Columns(col =>
{
col.Field("OrderID").HeaderText("Order ID").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("EmployeeID").HeaderText("Employee ID").Width("150").Add();
col.Field("OrderDate").HeaderText("Order Date").Width("130").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Format("yMd").Add();
col.Field("Freight").HeaderText("Freight").Width("120").Format("C2").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("ShippedDate").HeaderText("Shipped Date").Width("130").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Format("yMd").Add();
}).FilterSettings(filter => filter.Columns(filterColumns)).Load("load").AllowPaging().Render()
<script>
function load(args) {
this.filterSettings.columns.filter(function (e) {
debugger
if (!e.properties.value) {
e.properties.value = null;
}
}.bind(this));
}
</script>
|