Note that there are some explanatory texts on larger screens.

plurals
  1. POjqGrid reload other grids after edit
    primarykey
    data
    text
    <p>first, I apologize for my english.</p> <p>I have 4 grids displaying data from different sql query results. They are categorized by their status. All the grids are working fine but there's one thing that I want to do but I just can't figure out how to do it. I wanted the other grids to refresh after successful edit. jqGrid only refreshes the current grid i'm currently editing, which is good, but I ended up refreshing the entire page to see the changed item on the other grid.</p> <p>I have used <code>.trigger("reloadGrid");</code> but this doesn't seem to work. </p> <p>How can i achieve this? please help. many thanks.</p> <p>This is the jqGrid:</p> <pre><code>$('#diag').jqGrid({ url: 'ajax/ajax-diag.php', data: 'xml', mtype: 'GET', colNames: ['Job', 'Client', 'Status', 'Notes'], colModel: [ { name: 'jobnumber', index:'jobnumber', align:'center', width: 70, editable:true}, { name: 'clientid', index:'clientid', align:'center', width: 70, editable:true }, { name: 'statuslabel', index:'statuslabel', align: 'center', width: 125, editable:true}, { name: 'notes', index: 'notes', align: 'center', editable: true } ], loadComplete: function() { if ($('#diag').getGridParam("records") == 0) { $('#diag').hide(); } }, pagination: true, pager: '#diagpager', rowNum: 10, rowList: [10,20,30], sortname: 'jobnumber', width: '100%', height: '100%', sortorder: 'desc', viewrecords: true, closeOnEscape: true, gridview: true, editurl: "ajax/ajax-edit.php", caption: 'Stage 1' }); $('#diag').jqGrid('navGrid', '#diagpager',{},{closeAfterEdit:true},{closeAfterAdd:true}); </code></pre> <p>I'm using navigator as well.</p> <p>SOLVED: Thanks to Manuel van Rijn, i found the correct parameter for the navigator pager.</p> <p>This is my final pager:</p> <pre><code>$('#diag').jqGrid('navGrid', '#diagpager',{},{ closeAfterEdit:true, afterComplete:function() { $('#twoRec').trigger('reloadGrid')} },{closeAfterAdd:true}); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload