Skip to content Skip to sidebar Skip to footer

Jqgrid And Zend Framework Trouble

I have a list of products on my site. I draw it with jqGrid. Also I have a form, to create new product, or update existing one. Is there any way to set in jqGrid, that when I press

Solution 1:

You can change url with respect of onclickSubmit function (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing#editgridrow):

$("#list").jqGrid({
    url:'product/getjson',
    // ...
});
$("#list").jqGrid('navGrid','#pager2',{edit:true,add:true,del:true},
                  { onclickSubmit: function(rp_ge, postdata) {
                      rp_ge.url = 'mysite/product/edit/id/' + postdata.list_id;
                    }
                  });

Solution 2:

Try to add editurl field in your config:

$("#list").jqGrid({
    editurl:'mysite/product/edit/'
});

id will be passed in row data

Post a Comment for "Jqgrid And Zend Framework Trouble"