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
820
Custom params in igHierarchicalGrid remote datasource
posted

Hi

We try to use igHierarchicalGrid with remote Datasource, and i need to add my own params in ajax call. 

I found that igDataSource have setting urlParamsEncoding, but Datasource property in igHierarchicalGrid need IQuerable type. I don't found possibility to set igDataSource as datasource for igHierarchicalGrid. And GridModel contains property named DatasourceUrl, this url called for remote call of grid.

So, maybe somebody can help me to add my custom params in ajax call, when grid get data from remote datasource.

Regards.

Parents
No Data
Reply
  • 15320
    Offline posted

    Hello aliaksei.yenzhyieuski@ihs.com,

    Thank you for posting in our community.

    Apologies for the late response to you, but in case you still need help I'm glad to assist you.

    Regarding your question, I've made a research and there is no built-in functionality of the igHierarchicalGrid that provides the ability to be added custom parameters to an ajax call. However you may use ajaxSend jquery event which is executed before an Ajax request is sent: http://api.jquery.com/ajaxSend/ and check through the url of the request and append it your custom parameters to it. For instance:

    $(document).ajaxSend(function (e, jqXHR, options) {

             if (options.url.indexOf("/Handler2.ashx") != -1) {

                 options.url += '&param1=value1';

             }

         });

    Please let me know if you have any further questions.

    Sincerely,

    Tsanna

Children
No Data