0

Sorry for my english... I'm learning how to use jqGrid following the examples of jqGrid Demos

What I need is very similar to the example shown in Advanced -> Master Details, only that I need the table "Details of the invoice" to be displayed on another page (not in the same url) and I don't know how to do it.

Thanks.

Mariano
  • 1
  • 1

1 Answers1

0

Please include always the version of jqGrid, which you use (can use), and the fork (free jqGrid commercial Guriddo jqGrid JS or an old jqGrid in version <=4.7).

It I correctly understand your question you can add onSelectRow callback to the main grid (the only grid on your first page). Inside of onSelectRow callback you can assign location to new URL to redirect to another page. You can append to the URL some additional parameter, which will be used by the second (detailed) page to load/display the details of the required item. In the simplest case it could be:

onSelectRow: function (rowid) {
    location = "secondPage.html?item=" + encodeURIComponent(rowid);
}
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • Thanks, but how can I redirect using POST? Because I don't want the rowid into the url. – Mariano Apr 04 '18 at 13:01
  • @Mariano: You can't "redirect" using POST directly. Instead of that you can submit some form existing on the page, which contains all required information. You can have such helper form statically on your page of you can create it dynamically. See [here](https://stackoverflow.com/a/10022098/315935) for example. – Oleg Apr 04 '18 at 13:31
  • thank for your help, the 4th answer of that link works for me – Mariano Apr 05 '18 at 03:53