I did manage to get slick grid going with a basic call in “aysnc attached” which worked however I wanted to implement pagination…
I understand that the structure in the viewmodel is as follows:
defineGrid() {
..
}
Grid options as follows…
this.gridOptions = {
enableAutoResize: true,
autoResize: {
containerId: 'demo-container',
sidePadding: 15
},
enableCellNavigation: true,
enableFiltering: true,
enableCheckboxSelector: true,
enableRowSelection: true,
pagination: {
pageSizes: [10, 15, 20, 25, 30, 40, 50, 75, 100],
pageSize: defaultPageSize,
totalItems: 0
},
backendServiceApi: {
service: new GridOdataService(),
preProcess: () => this.displaySpinner(true),
process: (query) => this.getCustomerApiCall(query),
postProcess: (response) => {
this.statistics = response.statistics;
this.displaySpinner(false);
this.getCustomerCallback(response);
}
}
};
Its here that I loose understanding… I am using a fetch and I can structure the asp.net return viewmodel anyway I want however I am unsure of the structure of the query that I need to send to the API and what to send back - its signature.
I am also unsure as to what the statistics refers to and finally if I want to include filters into the mix how to do that on the client end?
I have RTFM and its not immediately apparent to me how to structure “query” in the “getCustomerApiCall(query)” function and exactly what to send back etc.