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
185
IgniteUI IGgrid change RestSettings
posted

Hi, I am trying to change the iggrid restsettings create url as below,

var settings = $("#grid1").igGrid("option", "restSettings");

var newUrl = settings.create.url.replace('$id', fundManagerId);

settings.create.url = newUrl;


But this doesnot seem to work, can you please help.

Parents
No Data
Reply
  • 17590
    Offline posted

    Hello Ashwini,

    Thank you for posting in our community.

    The reason why your approach is not working is that restSettings are not settable. As demonstrated in our documentation you can only retrieve this option settings. However, they can not be set runtime. The reason is that these settings are passed to igDataSource when it is initialized and if they are changed afterwards via the igGrid settings new values are not going to be taken under consideration.

    What I can suggest as a workaround is setting the values of the internal variables that igDataSource uses. For example:

    $("#grid").data("igGrid").dataSource._postUrl = "newUrl"

    I hope you will find my suggestion useful.

    Please let me know if you need any further assistance with this matter.

Children
No Data