0

I'm trying to get an URL of the form http://xxxxx/application/sorting-plan-definition-edit/55555 (with 55555 the id of the row) in a JQGrid. I tried with a showlink formatter, but to no avail. If I do something like that:

formatoptions: {
    baseLinkUrl: contextPath + '/sorting-plan-definition-edit',
    idName: 'id'
},

I of course get an URL like http://xxxxx/application/sorting-plan-definition-edit?id=555555, which is not what I want. How could it be done?

Alexis Dufrenoy
  • 11,784
  • 12
  • 82
  • 124

2 Answers2

0

You can just use custom formatter or to use formatter: "dynamicLink" which you can download here (the file jQuery.jqGrid.dynamicLink.js) and which I described initially in the answer (see the answer too).

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
0

I was able to manage, with a Javascript formatter function combined with a JSTL tag (as I work with a Java EE server):

"formatter": function(cellvalue, options, rowObject) {
    return "<a href='<c:url value="/sorting-plan-definition-edit" />/" + cellvalue + "'>" + cellvalue + "</a>";
}
Alexis Dufrenoy
  • 11,784
  • 12
  • 82
  • 124