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.
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.