Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Send additional parameters with dataSourceUrl + Angular2
posted

Hi Team,

I am working on remote pagination with Angular2+iggrid. I have noticed that some parameters are getting added to the URL(Get) e.g. $skip,$top,$inlinecount,pk...

I can get this values on server side and process pagination based on that.

But i am not able to send additional/customized parameters in the URL like custom query/token etc...

In forum,I came to know that using urlParamsEncoded event i can set the values before processing URL but failed to achieve this in Angular2.

Or is there any alternate way to pass additional parameters in get data request?

Any help would be appreciated...

Regards,

Prashant

Parents
  • 29417
    Offline posted

    Hello Prashant,

     Thank you for posting in our forum. 

    The urlParamsEncoded option is an option of the igDataSource (not the igGrid).

    You can set it, for example on the grid’s dataBinding event, for example: 

    dataBinding: function(evt, ui){

                     ui.dataSource.settings.urlParamsEncoded = function(item, params){

                                     params.extraParams = { additionalParam: "abc"};

                     };

     }

     

    I’ve attached a sample for your reference. Let me know if you have any additional questions or concerns.

     

    Best Regards,

    Maya Kirova

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

     

    angular2-paging.zip
Reply Children