When using the igGrid with remote data source, is there any way to include additional parameters in the POST body of the request made to the server for retrieving the data?
Hi Ricky Li,
This is to let you know that I have received your inquiry and will be looking into this for you. I will follow-up with you here on the thread on or about Wednesday. Thanks!
For the context of this question, are you doing remote paging, remote filtering, something else? Also, can you give me a brief overview of what you want to accomplish and in what way what you want to do with additional parameters with the remote ds is similar, different, or an alternative to using an ajax call? Any supporting code you want to show is always helpful.
Thanks!
Hi Troy,
We're building a tool for the user to construct their own report. The tool allows the user to select the columns and row selection criteria for the data to be shown in the grid. What we'd like to do is to serialize the user selection into a json string and have the grid pass this to the server when retrieving the data. We're also doing remote paging and filtering.
Regards,- Ricky
Hello Troy,
you stated "Passing in the data source url is the way this can be handled. The only other way would be through an ajax call." Can you collaborate more this this? can you give me an example how to do it?
Thank you very much
Hi Ricky,
Passing in the data source url is the way this can be handled. The only other way would be through an ajax call.
The additional information I'm passing in to get the grid data contains the row selection criteria and the column list, which is quite big to be included in the URL. Therefore, I'll need that to be passed in the request's post body when the grid sends the request to the server for the grid data. Doing it with a separate AJAX call will also be a possible option but I'd like to see if this can be achieved by using the ig remote data source directly.
Let me know if you need additional assistance regarding this.
It should be possible to pass additional parameters within the url that you pass to the data source. Have you tried this approach? If yes, can you show an example of what your url looks like? Perhaps its a format issue that causing trouble.
Passing parameters with the POST body would also be appropriate, but I'd see that being done with an ajax call. Can you show me how you are wanting to do the similar with the remote data source?