With the GridComponent
defined as:
<jqxGrid #myGrid
[source]="dataAdapter"
[columns]="columns"
[pageable]="true"
[virtualmode]="true"
[rendergridrows]="rendergridrows">
</jqxGrid>
and:
export class GridComponent {
columns: any[] = [];
source: any =
{
datatype: 'json',
datafields: [],
url: 'http://localhost/getdata',
cache: false,
root: 'Rows',
beforeprocessing: (data: any) => {
this.source.totalrecords = data.TotalRows;
}
};
dataAdapter: any = new jqx.dataAdapter(this.source);
rendergridrows = (params: any): any => {
return params.data;
}
}
Looking at the backend’s log running as Python Flask http server
I can see that the grid
‘s dataAdapter
makes the http
request using the URL:
http://localhost/getdata?filterscount=0&groupscount=0&pagenum=0&pagesize=10&recordstartindex=0&recordendindex=10&_=1591929189583
Evidently, the supplied source.url
http://localhost/getdata
is appended with the parameters such as filterscount
, groupscount
,
pagenum
, pagesize
, recordstartindex
and recordendindex
.
I wonder if there is a way to customize the URL used to make the http request. For instance, I would like to send the username
argument to the specified http://localhost/getdata
url. Where should I specify it?