Hi,
We are using IgniteUI version 16.2.20162.1035.
As the web service method requires a lot of parameters, doing a 'POST' request to retrieve a big dataset (more than 300k records). Obvious choice would be to rely on Paging.
Configuring igGrid as follows:
dataSource: data, odata: false, responseDataKey: "Data", virtualization: false, rowVirtualization: false, columnVirtualization: false, childrenDataProperty: "Notes", primaryKey: 'TxnId', expandCollapseAnimations: false, autoCommit: true, autoGenerateColumns: false, autoGenerateLayouts: false, height: '100%', width: '100%', features: [ { name: "Paging", type: "remote", pageSize: searchPageSize, showPageSizeDropDown: false, recordCountKey: 'TotalRecordCount', pageIndexChanged: function (event, args) { searchPageNumber(args.pageIndex); searchForTransactions(); } }
Sample of data received: {"Data":[{"TxnId":256892438}],"TotalRecordCount":100000}
As a result data is displayed up to the searchPageSize, but no actual pagination generated for the rest of the data. Happy to hear any suggestions.
Hello Milen,
Thank you for contacting Infragistics!
I believe this is happening because you data is local and you set the paging feature to be remote. As the paging itself isn’t making the request for data and instead you are doing it outside the grid you would want to set the type to local. Or instead you could use the dataSourceUrl of the grid and let the grid fetch the data and leave paging remote.
Thanks for your prompt reply Mike. Maybe I did not explain that well. I've already tried with the different settings on the Grid. 'local'/'remote' does not change much in regards to this behavior.
In regards to dataSourceUrl, how do I control the request body for all the requests the grid would do in such case? In this scenario, I'd need to pass many additional parameters, not possible to be passed via GET request.
Cheers,
Milen
I am assisting with this since Mike P. is out of the office today and tomorrow.
In regards to using the dataSourceUrl, you can add additional querystring parameters using the urlParamsEncoded event of the igRemoteDataSource.
This forum thread here discusses more on this topic.
If you have any further questions or concerns with this, please let us know.
Hi Michael,
That looks good, but how do I change the HTTP method (e.g. 'POST') used between paging requests? Parameters to be passed would easily reach beyond 2,048 characters limit for URLs. All required by the API backend, which cannot be re-written at this moment.
Hi Milen,
You can also set the requestType option of the igRemoteDataSource. e.g.
$("#grid").data("igGrid").dataSource.settings.requestType = "POST";
Thanks for your support on this. Couldn't make it work for the purposes of the app, so I had to resort to other ways of achieving the expected outcome.
Thanks,
Thank you for the update. With you workaround were you able to resolve your issue? Please let me know if you have any further questions concerning this matter.