<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Reload grid after cell edit</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/reload-grid-after-cell-edit</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/reload-grid-after-cell-edit/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Reload grid after cell edit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/reload-grid-after-cell-edit#p31293</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/reload-grid-after-cell-edit#p31293</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>I say again - currently, please post your problem here <a href="http://www.trirand.net/forum" rel="nofollow" target="_blank">http://www.trirand.net/forum</a></p>
<p>Â </p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Mon, 27 Oct 2014 15:11:59 +0200</pubDate>
        </item>
        <item>
        	<title>krish on Reload grid after cell edit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/reload-grid-after-cell-edit#p31280</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/reload-grid-after-cell-edit#p31280</guid>
        	        	<description><![CDATA[<p>Hi, Tony,</p>
<p>In jqgrid i had edited a record on page 5 and submitted but I can't see the newly updated record and should stay on the same page.</p>
<p>Please help</p>
<p>I am using below code: Â not working it stays on same current page but the record is not updated.</p>
<p>var currentPage = jQuery("#mygrid").getGridParam('page');<br />
 jQuery("#mygrid").jqGrid('setGridParam', {datatype: 'json'}).trigger("reloadGrid", [{page: currentPage}]);</p>
]]></description>
        	        	<pubDate>Thu, 23 Oct 2014 05:23:00 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Reload grid after cell edit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/reload-grid-after-cell-edit#p31269</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/reload-grid-after-cell-edit#p31269</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>Please post your question here: <a href="http://www.trirand.net" rel="nofollow" target="_blank">http://www.trirand.net</a></p>
<p>Â </p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Tue, 21 Oct 2014 18:01:40 +0300</pubDate>
        </item>
        <item>
        	<title>sagana on Reload grid after cell edit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/reload-grid-after-cell-edit#p31231</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/reload-grid-after-cell-edit#p31231</guid>
        	        	<description><![CDATA[<p>I change the value of the quantity. The underlying table is correctly changed and I can get the alert('edit done') fires. However what I want instead of that alert is for the grid to be reloaded to show the newly calculated values that are in the table. If I press the reload button at the bottom of the grid the correct new figures are shown but i would like this to happen if I click on a new line or cell in the grid. What code should I replace alert('edit done') with to achieve this please, or is there a better way to do it?</p>
<p>// Set some grid options<br />
$grid-&#62;setGridOptions(array(<br />
 "rowNum"=&#62;5,<br />
 "sortname"=&#62;"item",<br />
 "rowList"=&#62;array(5,30,50),<br />
 "height"=&#62;120,<br />
 "width"=&#62;950,<br />
 "cellEdit"=&#62; true,<br />
 "mtype" =&#62; "POST",<br />
 "cellsubmit" =&#62; "remote",<br />
 "cellurl" =&#62; "includes/ajaxpicked.php"<br />
 ));</p>
<p>// Enable footerdata an tell the grid to obtain it from the request<br />
$grid-&#62;setGridOptions(array("footerrow"=&#62;true,"userDataOnFooter"=&#62;true));</p>
<p>// reload grid after successful edit<br />
$grid-&#62;setGridEvent("afterSaveCell", "function(rowid,name,val,iRow,iCol) {alert('edit done')}");</p>
<p>$grid-&#62;addCol(array("name"=&#62;"act"),"last");</p>
<p>// Change some property of the field(s)<br />
$grid-&#62;setColProperty("uid", array("label"=&#62;"ID", "width"=&#62;25, "editable"=&#62;false, "hidden"=&#62;true));<br />
$grid-&#62;setColProperty("itemcode", array("label"=&#62;"Item Code", "width"=&#62;60, "editable"=&#62;false));<br />
$grid-&#62;setColProperty("item", array("label"=&#62;"Item", "width"=&#62;150, "editable"=&#62;false));<br />
$grid-&#62;setColProperty("price", array("label"=&#62;"Price", "width"=&#62;80, "editable"=&#62;false));<br />
$grid-&#62;setColProperty("unit", array("label"=&#62;"Unit", "width"=&#62;50, "editable"=&#62;false));<br />
$grid-&#62;setColProperty("quantity", array("label"=&#62;"Qty", "width"=&#62;50, "editable"=&#62;true, "editrules"=&#62;array("number"=&#62;true)));<br />
$grid-&#62;setColProperty("value", array("label"=&#62;"Value", "width"=&#62;70, "editable"=&#62;false, "editable"=&#62;false, "align"=&#62;"right", "formatter"=&#62;"number","formatoptions"=&#62;array("thousandsSeparator"=&#62;",","decimalPlaces"=&#62;2)));<br />
$grid-&#62;setColProperty("discount", array("label"=&#62;"Disc.", "width"=&#62;60, "editable"=&#62;false, "align"=&#62;"right", "formatter"=&#62;"number","formatoptions"=&#62;array("thousandsSeparator"=&#62;",","decimalPlaces"=&#62;2)));<br />
$grid-&#62;setColProperty("tax", array("label"=&#62;"Tax", "width"=&#62;50, "editable"=&#62;false, "align"=&#62;"right", "formatter"=&#62;"number","formatoptions"=&#62;array("thousandsSeparator"=&#62;",","decimalPlaces"=&#62;2)));<br />
$grid-&#62;setColProperty("tot", array("label"=&#62;"Total", "width"=&#62;50, "editable"=&#62;false, "align"=&#62;"right", "formatter"=&#62;"number","formatoptions"=&#62;array("thousandsSeparator"=&#62;",","decimalPlaces"=&#62;2)));<br />
$grid-&#62;setColProperty("pay", array("label"=&#62;"Pay", "width"=&#62;20, "editable"=&#62;false, "hidden"=&#62;true));<br />
$grid-&#62;setColProperty("trackserial", array("label"=&#62;"Serial", "width"=&#62;20, "editable"=&#62;false, "hidden"=&#62;true));<br />
$grid-&#62;setColProperty("ref", array("label"=&#62;"Ref", "width"=&#62;20, "editable"=&#62;false, "hidden"=&#62;true));<br />
$grid-&#62;setColProperty("act", array("label"=&#62;"Selection", "width"=&#62;50, "editable"=&#62;false));</p>
<p>// At end call footerData to put total label<br />
$grid-&#62;callGridMethod('#tradlist', 'footerData', array("set",array("quantity"=&#62;"Total:")));<br />
// Set which parameter to be sumarized<br />
$summaryrows = array("value"=&#62;array("value"=&#62;"SUM"),"tax"=&#62;array("tax"=&#62;"SUM"),"tot"=&#62;array("tot"=&#62;"SUM"));</p>
<p>$loadevent = &#60;&#60;&#60;LOADCOMPLETE<br />
function(rowid){<br />
 var ids = jQuery("#purchlist").getDataIDs();<br />
 for(var i=0;i&#60;ids.length;i++){<br />
 var rowd = $("#purchlist").getRowData(ids[i]);<br />
 var cl = ids[i];<br />
 var topay = rowd.pay;<br />
 var track = rowd.trackserial;<br />
 var rf = "'"+rowd.ref+"'";<br />
 var se = "";<br />
 if (topay == 'N') {<br />
 be = '&#60;img src="../images/close.png" title="Add to be refunded" onclick="javascript:purchdeselect('+cl+')" &#62;&#60;/ids&#62;';<br />
 } else {<br />
 be = '&#60;img src="../images/accept.gif" title="De-select" onclick="javascript:purchselect('+cl+')" &#62;&#60;/ids&#62;';<br />
 if (track == 'Yes') {<br />
 se = '&#60;img src="../images/barcode.png" title="Purchased serial nos." onclick="javascript:showserial('+cl+','+rf+')" &#62;&#60;/ids&#62;';<br />
 }<br />
 }<br />
 jQuery("#purchlist").setRowData(ids[i],{act:be+'&#38;nbsp;&#38;nbsp;&#38;nbsp;'+se});<br />
 }<br />
}<br />
LOADCOMPLETE;</p>
<p>Â </p>
<p>$grid-&#62;setGridEvent("loadComplete",$loadevent);<br />
// Enable navigator<br />
$grid-&#62;navigator = true;<br />
// Disable some actions<br />
$grid-&#62;setNavOptions('navigator', array("excel"=&#62;true,"add"=&#62;false,"edit"=&#62;false,"del"=&#62;false,"view"=&#62;false));</p>
<p>// Run the script<br />
$grid-&#62;renderGrid('#purchlist','#purchpager',true, $summaryrows, null,true,true,true);<br />
?&#62;</p>
]]></description>
        	        	<pubDate>Fri, 17 Oct 2014 01:24:32 +0300</pubDate>
        </item>
</channel>
</rss>