<?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: setCell() saves data as undefined</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/setcell-saves-data-as-undefined</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/setcell-saves-data-as-undefined/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Seroczynski on setCell() saves data as undefined</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/setcell-saves-data-as-undefined#p19933</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/setcell-saves-data-as-undefined#p19933</guid>
        	        	<description><![CDATA[<p>Hello again,</p>
<p>Once again I&#39;m in some need for asistance, this time with the <strong>setCell()</strong> method. I&#39;ll jump straight in with the script for my grid. </p>
<p><input type='button' class='sfcodeselect' name='sfselectit6156' value='Select Code' data-codeid='sfcode6156' /></p>
<div class='sfcode' id='sfcode6156'>
<pre id=&#34;line43&#34;>jQuery(document).ready(function(){ 
jQuery(&#39;#Algemeen&#39;).jqGrid({ 
hidegrid: false, 
width: 860, 
height: 500, 
xmlReader: { 
root: &#39;Grid&#39;, 
row: &#39;Rij&#39;, 
page: &#39;Grid&#62;Pagina&#39;, 
total: &#39;Grid&#62;Paginas&#39;, 
records: &#39;Grid&#62;Records&#39;, 
repeatitems: false, 
id: &#39;AKID&#39; 
}, 

url: &#39;functions/JqGridData.php&#39;, 
datatype: &#39;xml&#39;, 
mtype: &#39;GET&#39;, 
colNames: [&#39;Del&#39;, &#39;IMG&#39;, &#39;ID&#39;, &#39;IMGURL&#39;], 
colModel: [ 
{name: &#39;Del&#39;, index:&#39;Acties&#39;, width:10, sortable:false, align:&#39;center&#39;}, 
{name: &#39;IMG&#39;, index:&#39;Image&#39;, width:10, sortable:false, align:&#39;center&#39;}, 
{name: &#39;AKID&#39;, index: &#39;AKID&#39;, width: 25,  editable: true,  editoptions:{size:2.5, readonly:false}}, 
{name: &#39;IMGURL&#39;, index: &#39;IMGURL&#39;, width: 70,  editable: true,  editoptions:{size:7, readonly:false}},], 
gridview: true, 
gridComplete: function() { 
var ids = jQuery(&#39;#Algemeen&#39;).jqGrid(&#39;getDataIDs&#39;); 
for(var i=0;i &#60; ids.length;i++) { 
im = &#34;&#60;img src=&#39;layout/img/icons/browse_klein.png&#39; style=&#39;cursor:pointer;&#39; onclick=\&#34;jQuery.customMethod();\&#34; /&#62;&#34;; 
jQuery(&#39;#Algemeen&#39;).jqGrid(&#39;setRowData&#39;,ids[i],{IMG:im}); 
} 
}, 
...<br />}); 
</pre>
</div>
<p>I&#39;m trying to edit a column from a onclick event on a button.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8674' value='Select Code' data-codeid='sfcode8674' /></p>
<div class='sfcode' id='sfcode8674'>jQuery(&#39;#Algemeen&#39;).setCell(&#39;row&#39;, &#39;column&#39;, &#39;someRandomText&#39;, undefined, undefined, false);</div>
<p>This seems to work, the value of the desired column changes to the expected value. But once I try to save the value, <strong>undefined</strong> is being send to the database, which obviously isn&#39;t what I wanted. I&#39;ve tried several things but none seem to fix this issue. What am I doing wrong here?</p></p>
]]></description>
        	        	<pubDate>Wed, 22 Sep 2010 16:55:19 +0300</pubDate>
        </item>
</channel>
</rss>