<?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: Client-side only updates</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/client-side-only-updates</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/client-side-only-updates/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Client-side only updates</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/client-side-only-updates#p14992</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/client-side-only-updates#p14992</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Just checked this. No problem. The only thing that can happen here is that if you add a record this way the method add a id which is totalrecords in page + 1. This way it is quite possible that there is a duplicate id.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 20 Feb 2010 11:54:20 +0200</pubDate>
        </item>
        <item>
        	<title>paulm on Client-side only updates</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/client-side-only-updates#p14902</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/client-side-only-updates#p14902</guid>
        	        	<description><![CDATA[<p>I&#39;m trying to set-up a grid which only does client-side editing (no Ajax back to the server). The data is loaded via Ajax and I&#39;ve set cellsubmit: &#39;clientArray&#39; - however, if I leave editurl empty it gives me an error about the Url being required. If I fill it in with an empty page, it "appears" to work. But if you do something like:</p>
</p>
<p>- Add new record</p>
<p>- Select record you just added and click on Edit</p>
<p>- Edit the record / click Save.</p>
<p>The client-side record isn&#39;t changed.</p>
<p>Here&#39;s what the code looks like:</p>
<p>&#60;script&#62;</p>
<p>&#160;&#160;&#160; $(document).ready(function () {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#grdInvoice").jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: &#39;InvoiceHandler.ashx?Method=GetInvoice&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: "json",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [&#39;Category&#39;, &#39;Part #&#39;, &#39;Description&#39;, &#39;Cost&#39;, &#39;PK&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Category&#39;, index: &#39;Category&#39;, width: 110, editable: true, edittype:"select", editoptions: "A:One;B:Two" },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;PartNumber&#39;, index: &#39;PartNumber&#39;, width: 170, editable: true, editoptions: { size: 20} },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Description&#39;, index: &#39;Description&#39;, width: 200, editable: true, editoptions: { size: 30} },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Cost&#39;, formatter: &#39;currency&#39;, align: "right", formatoptions: { prefix: "$" }, index: &#39;Cost&#39;, width: 95, editable: true, editoptions: { size: 10} },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;PK&#39;, hidden: true, editable: false}<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: "Invoice",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; viewrecords: true,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; cellsubmit: &#39;clientArray&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editurl: "InvoiceHandler.ashx?Method=Nothing"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#btnAdd").click(function () {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#grdInvoice").jqGrid(&#39;editGridRow&#39;, "new", { reloadAfterSubmit: false });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#btnEdit").click(function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var selRow = $("#grdInvoice").jqGrid("getGridParam", "selrow");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (selRow != null)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#grdInvoice").jqGrid("editGridRow", selRow);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; alert("Please select a row.");</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#btnDelete").click(function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var selRow = $("#grdInvoice").jqGrid("getGridParam", "selrow");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (selRow != null)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#grdInvoice").jqGrid("delGridRow", selRow);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; alert("Please select a row.");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160; });<br />&#160;&#160;&#160; &#60;/script&#62;</p>
]]></description>
        	        	<pubDate>Wed, 17 Feb 2010 17:19:15 +0200</pubDate>
        </item>
</channel>
</rss>