<?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: Errors due to search.headers being null</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/errors-due-to-searchheaders-being-null</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/errors-due-to-searchheaders-being-null/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>rituraj_tiwari on Errors due to search.headers being null</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/errors-due-to-searchheaders-being-null#p13476</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/errors-due-to-searchheaders-being-null#p13476</guid>
        	        	<description><![CDATA[<p>Tony,</p>
<p>Thanks for your response. At this point I am not in a position to do extensive testing.&#160; I was hoping that the changes would point to obvious coding bugs since you wrote the code.</p>
</p>
<p>I am able to get jqGrid to work satisfactorily with my hack, so I am OK for now.</p>
</p>
<p>-Raj</p>
]]></description>
        	        	<pubDate>Wed, 30 Dec 2009 23:41:03 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Errors due to search.headers being null</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/errors-due-to-searchheaders-being-null#p13113</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/errors-due-to-searchheaders-being-null#p13113</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks for these investigations, but you are the only to this moment that reported this behaviour.</p>
<p>IMHO there is something else - and I think that this is coused by the data provided from you.</p>
<p>In order to izolate the problem I suggest you to test your application only with jqGrid removing any other plugins</p>
<p>and js files that are not needed.</p>
<p>Instead I will not do this change.</p>
<p>Thank you</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 17 Dec 2009 15:04:06 +0200</pubDate>
        </item>
        <item>
        	<title>rituraj_tiwari on Errors due to search.headers being null</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/errors-due-to-searchheaders-being-null#p13063</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/errors-due-to-searchheaders-being-null#p13063</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>In debuging issues I was having with sorting table, I had to make some code changes. Here is a list of what I had to modify  in <em>grid.base.js</em>:</p>
<ol>
<li>grid.headers[k] is undefined in the loop in two places. I had to place a null / undefined check:
<ol>
<li>Line 899: <em><span style="color: #000080;">$(this).css("width",grid.headers[k].width+"px")</span>;</em></li>
<li>Line 1576: <span style="color: #000080;"><em>$(this).css("width",self.grid.headers[k].width+"px");</em></span></li>
</ol>
</li>
<li>Appending sorted row to grid was causing my Firefox to freeze, chew up tons of memory and report unruly script. The problem was happening on line 910: <span style="color: #000080;"><em>$(&#39;tbody&#39;,ts.grid.bDiv).append(row);</em></span>. Since I am not very good with Javascript, I fixed this issue by changing line 903 onwards. Changes are as follows:
<ol>
<li>Previously: <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #000080;"><em>var cn = "";<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(ts.p.altRows) cn = ts.p.altclass;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $.each(rows, function(i, row) {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(cn) {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(i%2 ==1) $(row).addClass(cn);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; else $(row).removeClass(cn);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <span style="color: #ff0000;">$(&#39;tbody&#39;,ts.grid.bDiv).append(row); &#60;--- This line was causing freeze</span><br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; row.sortKey = null;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; });</em></span></li>
<li>Now:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <em><span style="color: #000080;">var cn = "";<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <span style="color: #99ccff;">// Raj change</span><br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var sRowsText = "";<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <span style="color: #99ccff;">// End Raj change</span><br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(ts.p.altRows) cn = ts.p.altclass;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $.each(rows, function(i, row) {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(cn) {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(i%2 ==1) $(row).addClass(cn);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; else $(row).removeClass(cn);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <span style="color: #99ccff;">// Raj change: Comment out the append<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; //$(&#39;tbody&#39;,ts.grid.bDiv).append(row);</span><br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var jRow = $( row );<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; sRowsText = sRowsText + "&#60;tr id=&#39;" + jRow.attr( "id" ) + "&#39; class=&#39;" + jRow.attr( "class" ) + "&#39; role=&#39;" + jRow.attr( "role" ) + "&#39;&#62;" + jRow.html() + "&#60;/tr&#62;"; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <span style="color: #99ccff;">// End Raj change</span><br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; row.sortKey = null;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; });<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <span style="color: #99ccff;">// Raj change: Clear out displayed rows and append rows to inside of table</span><br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var dataTable = $(&#39;table&#39;,ts.grid.bDiv);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; dataTable.children().remove();<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; dataTable.html( sRowsText );<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <span style="color: #99ccff;">// End Raj change</span></span></em></li>
</ol>
</li>
</ol>
<p>I hope this is useful.</p>
</p>
<p>-Raj</p>
]]></description>
        	        	<pubDate>Wed, 16 Dec 2009 01:59:27 +0200</pubDate>
        </item>
</channel>
</rss>