App.vue
<template>
<div id="app">
<ejs-grid
:dataSource="data"
:allowFiltering="true"
:filterSettings="filterOptions"
height="273px"
>
<e-columns>
---
</e-columns>
</ejs-grid>
</div>
</template>
<script>
-----
export default {
data() {
return {
data: data,
filterOptions: {
ignoreAccent: true
}
};
},
provide: {
grid: [Filter]
}
};
</script>
|
App.vue
<template>
<div id="app">
<ejs-grid :dataSource="data" :allowFiltering="true">
<e-columns>
<e-column field="OrderID" headerText="Order ID" textAlign="Right" width="90"></e-column>
<e-column field="CustomerID" headerText="Customer ID" width="120"></e-column>
<e-column field="Freight" headerText="Freight" textAlign="Right" format="C2" width="90"></e-column>
<e-column
field="OrderDate"
headerText="Order Date"
textAlign="Right"
format="yMd"
type="date"
width="120"
></e-column>
</e-columns>
</ejs-grid>
</div>
</template>
<script>
import Vue from "vue";
import { GridPlugin, Filter } from "@syncfusion/ej2-vue-grids";
import { DataManager, ODataAdaptor } from "@syncfusion/ej2-data";
Vue.use(GridPlugin);
class SerialNoAdaptor extends ODataAdaptor {
onPredicate(predicate, query, requiresCast) {
predicate.value = predicate.value.toLowerCase();
var returnvalue = super.onPredicate.call(
this,
predicate,
query,
requiresCast
);
return decodeURIComponent(returnvalue); // returning lowercase value of filter string
}
}
export default {
data() {
let SERVICE_URI =
return {
data: new DataManager({
url: SERVICE_URI,
adaptor: new SerialNoAdaptor(),
crossDomain: true
})
};
},
provide: {
grid: [Filter]
}
};
</script>
<style>
@import "https://cdn.syncfusion.com/ej2/material.css";
</style>
|
Image #1:
|
Image #2: decode the request
|