Set URL dynamically for JQgrid

Posted: January 20, 2016 in JavaScript, JQuery

We can use the setGridParam method for setting the URL dynamically. Below is the syntax and example for this.

Syntax:

$(“#gridname”).setGridParam(
{
url:”new url”,
page:1
}
).trigger(“reloadGrid”);//Reload grid trigger

Example:

$(“#list”).setGridParam(
{
url:”RelatedPublication.cfc?method=GetUnrelatedPublications&PublicationID=”+pubid,
page:1
}
).trigger(“reloadGrid”);//Reload grid trigger

Leave a comment