<?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: elem&#091;0&#093; is undefined in call to setRowData()</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata</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/elem0-is-undefined-in-call-to-setrowdata/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>jnavratil on elem&#091;0&#093; is undefined in call to setRowData()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5296</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5296</guid>
        	        	<description><![CDATA[<p>Tony,</p>
<p>After reading this, I went back to the demo code and noticed the empty string as the first element of the array to correspond to the &#39;act&#39; column.</p>
<p>I suppose I should have gotten the demo working first to build confidence, but I am sometimes too impatient.</p>
<p>Do you think a comment in the demo code explaining that would be valuable?&#160; I&#39;m sure you have enough to do, but it would have helped me.&#160; You could, in fact, change the empty string to "act placeholder" to illustrate the point.&#160; Just a thought!</p>
<p>Thanks,</p>
<p>-- John</p>
]]></description>
        	        	<pubDate>Thu, 12 Mar 2009 13:09:53 +0200</pubDate>
        </item>
        <item>
        	<title>tony on elem&#091;0&#093; is undefined in call to setRowData()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5276</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5276</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>This is the right way.</p>
<p>Reagrds</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 12 Mar 2009 11:22:34 +0200</pubDate>
        </item>
        <item>
        	<title>jnavratil on elem&#091;0&#093; is undefined in call to setRowData()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5244</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5244</guid>
        	        	<description><![CDATA[<p>Tony,</p>
<p>I added another column to my database query to return a blank &#39;act&#39; column with the result that I had a grid column defined.&#160; Now I have buttons.&#160; That is, my database query became ...</p>
<p>SELECT invid,invdate,client_id,amount,tax,total,note, &#39;&#39; as act FROM invheader ORDER BY invid asc LIMIT 0 , 10</p>
<p>By adding the " &#39; &#39; as act " to the query, the json reader created the extra grid column I needed.</p>
<p>Is there a better way to do this?</p>
<p>Thanks,</p>
<p>-- John</p>
]]></description>
        	        	<pubDate>Wed, 11 Mar 2009 08:50:31 +0200</pubDate>
        </item>
        <item>
        	<title>jnavratil on elem&#091;0&#093; is undefined in call to setRowData()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5242</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5242</guid>
        	        	<description><![CDATA[<p>Tony,</p>
<p>I changed loadComplete() to gridComplete() and observed the same behaviour.</p>
<p>In stepping through the code, I observe this is a problem selecting the object.&#160; The selector is "td:eq(7)", but at the time of the call there are only 7 columns in the grid with the result that an object of length 0 is passed into the formatter.</p>
<p>All column headings are displayed, but it seems the body of the grid has not yet had the column for the buttons added.&#160; In fact, below the "Actions" heading there appears to be nothing (no zebra stripes).&#160; I have attempted to put the buttons on the right of the grid, while the example has them on the left.</p>
<p>Is there something I should do to force this column to be present?</p>
<p>Thanks!</p>
<p>-- John</p>
]]></description>
        	        	<pubDate>Wed, 11 Mar 2009 08:34:18 +0200</pubDate>
        </item>
        <item>
        	<title>tony on elem&#091;0&#093; is undefined in call to setRowData()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5239</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5239</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Try to use gridComplete and not loadComplete.</p>
]]></description>
        	        	<pubDate>Wed, 11 Mar 2009 08:06:43 +0200</pubDate>
        </item>
        <item>
        	<title>jnavratil on elem&#091;0&#093; is undefined in call to setRowData()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5236</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5236</guid>
        	        	<description><![CDATA[<p>Tony,</p>
<p>I added...</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var cm = $(&#39;#grid&#39;)[0].p.colModel;</p>
<p>... to my loadComplete() method and verified that cm[7] contained {index : &#8220;act&#8221;, name : &#8220;act&#8221;, sortable : false, width : 75}.</p>
</p>
<p>-- John</p>
]]></description>
        	        	<pubDate>Wed, 11 Mar 2009 07:13:10 +0200</pubDate>
        </item>
        <item>
        	<title>jnavratil on elem&#091;0&#093; is undefined in call to setRowData()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5234</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5234</guid>
        	        	<description><![CDATA[<p>Tony,</p>
<p>Yes.&#160; The thing I am doing differently from the example is that I have queried the database table I wish to edit for its schema so that I can build a table dynamically.&#160; First I build an array of colNames and colModels, then I use them to define the grid.&#160; Using the javascript debugger, I have verified that colNames[7] is "act" and colModel[7] is {index : "act", name : "act", sortable : false, width : 75} when used in the jqGrid constructor.</p>
<p>I have no reason to suspect any problem as the table is properly populated with the data from the table.</p>
<p>Thanks for any help you may have, and thanks as well for this marvelous plugin.</p>
<p>-- John</p></p>
]]></description>
        	        	<pubDate>Wed, 11 Mar 2009 06:12:17 +0200</pubDate>
        </item>
        <item>
        	<title>tony on elem&#091;0&#093; is undefined in call to setRowData()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5228</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5228</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Do you have defined a act coulmn in the colModel?</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 11 Mar 2009 03:17:16 +0200</pubDate>
        </item>
        <item>
        	<title>jnavratil on elem&#091;0&#093; is undefined in call to setRowData()</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5202</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/elem0-is-undefined-in-call-to-setrowdata#p5202</guid>
        	        	<description><![CDATA[<p>jquery 1.3.1</p>
<p>jqGrid 3.4.1</p>
<p>FireFox 3.0.7</p>
<p>Fedora 10 (64-bit)</p>
<p>I am trying to implement the edit buttons as shown in the "Custom Edit" demo.&#160; My loadComplete() method is...</p>
<p>loadComplete: function(){<br />&#160;&#160; var ids = jQuery(gridName).getDataIDs();<br />&#160;&#160; for(var i=0;i&#60;ids.length;i++) {<br />&#160;&#160;&#160;&#160;&#160; var cl = ids[i];<br />&#160;&#160;&#160;&#160;&#160; alert(cl + &#39; name:&#39; + gridName);<br />&#160; &#160; &#160; be = "&#60;input style=&#39;height:22px;width:20px;&#39; type=&#39;button&#39; value=&#39;E&#39; onclick=jQuery(&#39;"+gridName+"&#39;).editRow("+cl+"); /&#62;";<br />&#160;&#160;&#160; &#160; se = "&#60;input style=&#39;height:22px;width:20px;&#39; type=&#39;button&#39; value=&#39;S&#39; onclick=jQuery(&#39;"+gridName+"&#39;).saveRow("+cl+"); /&#62;";<br />&#160;&#160;&#160; &#160; ce = "&#60;input style=&#39;height:22px;width:20px;&#39; type=&#39;button&#39; value=&#39;C&#39; onclick=jQuery(&#39;"+gridName+"&#39;).restoreRow("+cl+"); /&#62;";<br />&#160;&#160;&#160;&#160;&#160; alert(be+se+ce);<br />&#160;&#160;&#160; &#160; jQuery(gridName).setRowData(ids[i],{act:be+se+ce});<br />&#160;&#160;&#160; &#160; }<br />},</p>
<p>I have verified the colNames and colModels contain the same number of elements and that the colNames and ColModel.name is &#39;act&#39;.&#160; The be+se+ce string is....</p>
<p>&#60;input style=&#39;height:22px;width:20px;&#39; type=&#39;button&#39; value=&#39;E&#39; onclick=jQuery(&#39;#grid&#39;).editRow(1); /&#62;<br />&#60;input style=&#39;height:22px;width:20px;&#39; type=&#39;button&#39; value=&#39;S&#39; onclick=jQuery(&#39;#grid&#39;).saveRow(1); /&#62;<br />&#60;input style=&#39;height:22px;width:20px;&#39; type=&#39;button&#39; value=&#39;C&#39; onclick=jQuery(&#39;#grid&#39;).restoreRow(1); /&#62;</p>
<p>(I did notice in the demo code there was what seemed to be a spurious &#39;&#62;&#60;/ids&#62;&#39; at the end of the first input which I removed)</p>
<p>My call is ...</p>
<p>jQuery(gridName).setRowData(ids[i],{act:be+se+ce});</p>
<p>In each case I get then elem[0] is undefined in grid.base.js line 715.</p>
<p>If I change the &#39;act&#39; to &#39;xxx&#39;, I get no error and obviously no buttons.</p>
<p>What am I missing?</p></p>
]]></description>
        	        	<pubDate>Tue, 10 Mar 2009 13:57:14 +0200</pubDate>
        </item>
</channel>
</rss>