Search code examples
jquery-uiurljqgridpretty-urls

Nice URL in JQGrid using a showlink formatter


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?


Solution

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