<?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: problem reloading local data</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/problem-reloading-local-data</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/problem-reloading-local-data/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>zodic on problem reloading local data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problem-reloading-local-data#p20666</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problem-reloading-local-data#p20666</guid>
        	        	<description><![CDATA[<p>Hello</p>
<p>I&#39;m having problem reloading data after adding new row to a local set, the record added to local set uses a wrong ID so its not editable before reloading. </p>
<p>here is my code :</p>
<p>$(document).ready(function () {</p>
<p>&#160; jQuery("#list2").jqGrid({<br />&#160;&#160;&#160;&#160; url: &#39;<a href="http://localhost:2525/Admin/Department/GetJsonDepartmentList&#038;#39" rel="nofollow" target="_blank"><a href="http://localhost:2525/Admin/De" rel="nofollow">http://localhost:2525/Admin/De</a>.....t&#038;#39</a>;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: "json",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [&#39;No&#39;, &#39;Name&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: [<br />&#160;&#160;&#160; { name: &#39;id&#39;, index: &#39;id&#39;, width: 45, resizable: true, editable: false },<br />&#160; name: &#39;name&#39;, index: &#39;name&#39;, width: 500, resizable: true, editable: true },</p>
<p>&#160;&#160;&#160; ],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum: 10,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowList: [10, 20, 30],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;id&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder: "desc",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; height: 310,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; scrollOffset: 0,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: &#39;#pager2&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160;&#160; editurl: "http://localhost:2525/Admin/Department/JqGridOperation",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; loadonce: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: "Department",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#list2").jqGrid(&#39;navGrid&#39;, &#39;#pager2&#39;, //options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {view:true},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { reloadAfterSubmit: true }, // edit options &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { reloadAfterSubmit: true }, // add options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { reloadAfterSubmit: true }, // del options &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {} // search options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; );<br />&#160;&#160;&#160;&#160;&#160;&#160; });</p>
<p>I tried adding event to &#39;add options&#39;(onClose, onclickSubmit,afterSubmit) to trigger reloadGrid but it fires on page reload.</p>
<p>reloadAfterSubmit: true <br />seems to have no effect at all on local data. also closeAfterAdd doesn&#39;t work at all. what am i doing wrong?<br />how can i fix this?<br />Edit : getting e is undefined when using afterSubmit event aswell. </p>
]]></description>
        	        	<pubDate>Thu, 04 Nov 2010 12:41:33 +0200</pubDate>
        </item>
</channel>
</rss>