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 ,
i have a grid and Loading data-source from server side . in some case looking for loading the data source on the basis of filter expression and also maintain the state of filter on UI side also . we are opening the the Grid other grid on row selection via Ajax request but if there is any filter expression available the we are storing in SessionStorage on the closing of grid we need to open the previous gring in same state via using the filterExpression
Currently we are doing that .
grid.igGrid({ rendered: function (evt, ui) {
var Expression = sessionStorage.getItem('filterExpression');
var expression = JSON.parse(Expression); sessionStorage.removeItem('filterExpression'); $("#Grid").igGridFiltering("filter", expression, true);}
});
but problem is that there two request goes to server side for fetching the record.
if there is any better approach is available then please share.
Thanks,
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.
Hi Troy,
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.
Regards,- Ricky
Let me know if you need additional assistance regarding this.