<?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: Cell edit - transform to JSON and marker erase</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/cell-edit-transform-to-json-and-marker-erase</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/cell-edit-transform-to-json-and-marker-erase/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Cell edit - transform to JSON and marker erase</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-edit-transform-to-json-and-marker-erase#p5025</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-edit-transform-to-json-and-marker-erase#p5025</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>1. You can use the available in jqGrid function&#160; stringify.</p>
<p>2. Currently little difficult - you should manually remove the class dirty-cell from the edited cells.</p>
<p>3. There is - could not remember - google it.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 28 Feb 2009 14:18:39 +0200</pubDate>
        </item>
        <item>
        	<title>majkel on Cell edit - transform to JSON and marker erase</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-edit-transform-to-json-and-marker-erase#p4955</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-edit-transform-to-json-and-marker-erase#p4955</guid>
        	        	<description><![CDATA[<p>I made the button that after few cells are edited saves results to DB. Communication between JS and PHP works but i cannot find easy way to transform array into JSON:</p>
<p>Button looks like this:</p>
<p>.navButtonAdd(&#8221;#pager2 ,#pager&#8221;,{caption:&#8221;Save&#8221;,title:&#8221;Save&#8221;,buttonimg: path + &#39;/basic/images/find.gif&#39;,<br />&#160; &#160; onClickButton:function(){ <br />&#160;	&#160; &#160; &#160; if (confirm (&#39;Sure?&#39;)) {<br />&#160;		&#160; &#160; &#160; &#160; &#160;changed_cells = $(&#39;#grid_table&#39;).getChangedCells(&#39;dirty&#39;);<br />&#160;		&#160; &#160; &#160; &#160; &#160;for(i=0;i&#60;(changed_cells.length);i++)<br />&#160;		&#160; &#160; &#160; &#160; { <br />&#160;			&#160; &#160; &#160; &#160; &#160; &#160; &#160;rowid = changed_cells[i][&#39;id&#39;];<br />&#160;			&#160; &#160; &#160; &#160; &#160; &#160; &#160;changed_cells[i][&#39;id_produkt&#39;]= $(&#39;#grid_table&#39;).getCell(rowid,0);<br />&#160;		&#160; &#160; &#160; &#160; }<br />&#160;		&#160; &#160; &#160; &#160; $.ajax({<br />&#160;			&#160; &#160; &#160; &#160; &#160; &#160;url: &#8220;translate_edit.php&#8221;,<br />&#160;			&#160; &#160; &#160; &#160; &#160; &#160;type: &#8220;post&#8221;,<br />&#160;			&#160; &#160; &#160; &#160; &#160; &#160;data:<span style="color: #ff0000;"> <strong>some_JSON_encode_funct</strong></span>(changed_cells),	&#160;<br />&#160;			 &#160; &#160; &#160; &#160; &#160; &#160;success: function(data) {			&#160;<br />&#160;				&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;alert(&#39;Success&#39;);},<br />&#160;			&#160; &#160; &#160; &#160; &#160; &#160;complete: function () {<br />&#160;				&#160; &#160; &#160; &#160; &#160; &#160; &#160; alert(&#39;Complete&#39;);<br />&#160;			&#160; &#160; &#160; &#160; }, <br />&#160; &#160; &#160; &#160; &#160;			error: function (xhr, ajaxOptions, thrownError){<br />&#160;	            &#160; &#160; &#160; &#160; &#160; &#160;alert(xhr.valueOf());<br />&#160;			&#160; &#160; &#160; &#160; }<br />&#160;		&#160; &#160; }); <br />&#160;	&#160; }<br />&#160;}<br />});</p>
<p>1.Is there a function that transforms array into JSON(like json_encode in PHP) in jqgrid or jquery(<span style="color: #ff0000;"><strong>some_JSON_encode_funct)?</strong></span></p>
<p><span style="color: #ff0000;"><strong></strong></span>2. How to erase red marker(triangle) in edited cell?</p>
<p>3. Is there a function that refresh content of whole page like refresh button that i could use it in a JS code?</p>
<p>Greetings</p>
<p>Majkel</p>
]]></description>
        	        	<pubDate>Wed, 25 Feb 2009 12:17:53 +0200</pubDate>
        </item>
</channel>
</rss>