<?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: setRowData doesn't work well with row data containing table elements</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-doesnt-work-well-with-row-data-containing-table-elements</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/bugs/setrowdata-doesnt-work-well-with-row-data-containing-table-elements/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on setRowData doesn't work well with row data containing table elements</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-doesnt-work-well-with-row-data-containing-table-elements#p9503</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-doesnt-work-well-with-row-data-containing-table-elements#p9503</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks. It is a bug. Will try to correct as soon as possible.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 09 Sep 2009 05:11:25 +0300</pubDate>
        </item>
        <item>
        	<title>Mike Chow on setRowData doesn't work well with row data containing table elements</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-doesnt-work-well-with-row-data-containing-table-elements#p9485</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-doesnt-work-well-with-row-data-containing-table-elements#p9485</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>I did set the new data with the table element, however it didn&#39;t work correctly.</p>
<p>It looks to me a bug in <strong>setRowData </strong>, see the code snippet&#160;below:</p>
<p>grid.base.js, line 1549 - 1560&#160;&#160;&#160;&#160;&#160;</p>
<p>$(this.p.colModel).each(function(i){<br />&#160;&#160;&#160;&#160;&#160;nm = this.name;<br />&#160;&#160;&#160;&#160;&#160;if( data[nm] != undefined) {<br />&#160;&#160;&#160;&#160;&#160;&#160;vl = t.formatter( rowid, data[nm], i, data, &#39;edit&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;if(t.p.treeGrid===true &#38;&#38; nm == t.p.ExpandColumn) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;$("td:eq("+i+") &#62; span:first",ind).html(vl).attr("title",$.jgrid.stripHtml(vl));<br />&#160;&#160;&#160;&#160;&#160;&#160;} else {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;$("td:eq("+i+")",ind).html(vl).attr("title",$.jgrid.stripHtml(vl)); <br />&#160;&#160;&#160;&#160;&#160;&#160;}<br />&#160;&#160;&#160;&#160;&#160;&#160;success = true;<br />&#160;&#160;&#160;&#160;&#160;}<br />&#160;&#160;&#160;&#160;});</p>
</p>
<p>The code assumes that td:eq(<span style="color: #ff0000;"><strong>i</strong></span>) contains the content of column colModel[<span style="color: #ff0000;"><strong>i</strong></span>]. However it is not the case when a cell contains&#160;TD tags. For example, see the table below. The index of "cell 3" is not 1 but 3.</p>
<p>&#60;table border=1&#62;<br />&#160;&#160;&#160; &#60;tr&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;td&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;table&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;tr&#62;&#60;td&#62;cell 1&#60;/td&#62;&#60;td&#62;cell 2&#60;/td&#62;&#60;/tr&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/table&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/td&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;td&#62;cell 3&#60;/td&#62;<br />&#160;&#160;&#160; &#60;/tr&#62;<br />&#60;/table&#62;</p>
</p>
<p>Thanks.</p></p>
]]></description>
        	        	<pubDate>Tue, 08 Sep 2009 12:24:43 +0300</pubDate>
        </item>
        <item>
        	<title>tony on setRowData doesn't work well with row data containing table elements</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-doesnt-work-well-with-row-data-containing-table-elements#p9431</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-doesnt-work-well-with-row-data-containing-table-elements#p9431</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>setRowdata replaces the cell content with what you set. So if your cell (td) contain another table you should set the new data with the table element.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 08 Sep 2009 07:32:08 +0300</pubDate>
        </item>
        <item>
        	<title>Mike Chow on setRowData doesn't work well with row data containing table elements</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-doesnt-work-well-with-row-data-containing-table-elements#p9420</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-doesnt-work-well-with-row-data-containing-table-elements#p9420</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
</p>
<p>One of the columns in my grid contains a table. It works fine when the whole grid is loaded from the server. However, when I try to update one of the rows by using setRowData, some of the cells are misplaced.</p>
<p>Can this be fixed?</p>
<p>Thank&#160;you!&#160;</p>
]]></description>
        	        	<pubDate>Mon, 07 Sep 2009 22:17:24 +0300</pubDate>
        </item>
</channel>
</rss>