Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141477 | Dec 13,2018 11:40 AM UTC | Dec 18,2018 12:06 PM UTC | jQuery | 5 |
![]() |
Tags: ejGrid |
grid.filterColumn( [
{ field: 'role', operator: 'equal', value: 'actor', predicate: 'or', matchcase: true},
{ field: 'role', operator: 'equal', value: 'actress', predicate: 'or', matchcase: true}
] );
<div id="Grid"></div>
<script type="text/javascript">
$(function () {
$("#Grid").ejGrid({
dataSource: window.gridData,
allowPaging: true,
allowFiltering: true,
enableHeaderHover: true,
filterSettings: {
filterType: "excel", filteredColumns: [{ field: "CustomerID", operator: "equal", value: "VINET", predicate: "or", matchCase: true },
{ field: "CustomerID", operator: "equal", value: "TOMSP", predicate: "or", matchCase: true }]
},
columns: [
{ field: "OrderID", isPrimaryKey: true, headerText: "Order ID", textAlign: ej.TextAlign.Right, width: 75 },
{ field: "CustomerID", headerText: "Customer ID", width: 120 },
. . .
]
});
});
</script> |
$("#Grid").ejGrid({
// the datasource "window.gridData" is referred from jsondata.min.js
dataSource: window.gridData,
allowPaging: true,
allowFiltering: true,
enableHeaderHover: true,
dataBound: function(args){
this.model.filterSettings.filteredColumns = [
{ field: "CustomerID", operator: "equal", value: "VINET", predicate: "or", matchCase: true },
{ field: "CustomerID", operator: "equal", value: "TOMSP", predicate: "or", matchCase: true }
]
this.refreshContent();
},
filterSettings: { filterType:"excel"},
columns: [
{ field: "OrderID", isPrimaryKey: true, headerText: "Order ID", textAlign: ej.TextAlign.Right, width: 75 },
{ field: "CustomerID", headerText: "Customer ID", width: 120 },
{ field: "EmployeeID", headerText: "Employee ID", textAlign: ej.TextAlign.Right, width: 130 },
{ field: "Freight", headerText: "Freight", textAlign: ej.TextAlign.Right,format: "{0:C2}", width: 80 },
{ field: "ShipCity", headerText: "Ship City", width: 90 },
{ field: "Verified", headerText: "Verified", width: 90 }
]
});
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.