My database is mongoDB, my current grid configuration is as below:
import React from 'react';
import { DataManager, WebApiAdaptor } from '@syncfusion/ej2-data';
import {
ColumnDirective,
ColumnsDirective,
GridComponent,
Page,
Inject,
Filter,
Sort
} from '@syncfusion/ej2-react-grids';
const data = new DataManager({
adaptor: new WebApiAdaptor,
url: '/api/listings'
});
const Grid = () => {
return (
<div style={{ margin: '2.5%', marginTop: '2.5%'}}>
<GridComponent
dataSource={ data }
allowPaging={ true }
allowFiltering={ true }
allowSorting={ true }
>
<Inject services={[ Page, Filter, Sort ]} />
GridComponent>
div>
)
};
export default Grid;
The grid is showing my data, so now I want to be able to customize the query parameters so my database could sort, filter, etc, but it seems that the grid has some default query parameters, as logged in my console:
It has a default query parameters of $inlinecount $skip and $top? I want to get rid of all the defaults so i'm left with only /api/listings
And then when I click on sort, I want to add my own query parameters...like /api/listings?sort=theColumnNameHere