This article from: http://cnn237111.blog.51cto.com/2359144/782137
Jqgrid in custom format, URL format when the official comes with the showlink is not very handy, so you can consider yourself to define the URL format custom format is very simple, in formatter: Fill in the function name such as Formatter:makeurl. , you can create a makeurl function. The signature of the function must follow the official convention, with 3 parameters. functionMakeurl (Cellvalue, Options, Rowobject) {returnurlstring;} Cellvalue-is the value to be formatted options-An object that contains the options: {Rowid:rid, colmodel:cm} rowId is the Rowid,colmodel of the current row is the value defined in Jqgrid rowobject-is the value of the current row. An example of each value assignment is as follows: if: Colmodel: [{name:"FileName", index: "filename", 550, SortType: "string", sortable:true, formatter:makeurl},{name:"DateTime", Index: "datetime", SortType: "string", Formatter: "string", sortable:true }],functionMakeurl (Cellvalue, Options, Rowobject) {alert (cellvalue); alert (rowobject["Test"]);//The value here is the corresponding value in the returned JSON. Alert (options["RowId"]); Alert (options["Colmodel" ["name"]);//The "filename" is returned herewith this trick, it's easy to return some custom URLs, and whatever parameters can be easily obtained, just from rowobject["Test"the data can be taken from objects such as. There is also a more straightforward way to direct the fields to be displayed directly in the returned JSON with the processed<A> this format processing. In that case, the link directly to the table is the one that can be used directly.
Jqgrid Details Note-jqgrid in custom format, URL format