Subgrilla in jqGrid


I'm starting with jqGrid and I'm guiding myself with jqGrid Demos

What I need is very similar to the example that appears in Advanced - > Master Detail , only that I need the "Invoice Detail" table to be displayed on another page and I do not know how to do it.

I would appreciate any help.

asked by Mariano 02.04.2018 в 07:04

1 answer


What you could do is create a formatter which invokes a function where you get a desired id or data to get the detail and this function sends to load your subgrid or grid detail on another page

function getSelectedRow() {
    var grid = $("#jqGrid");
    var rowKey = grid.jqGrid('getGridParam',"selrow");

    if (rowKey)
        alert("Selected row primary key is: " + rowKey);
        alert("No rows are selected");

with that function you get the id of the selected row with it you could send the new grid where you want if it is a new sale you can use with javascript link

answered by 02.04.2018 в 18:29