<?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: Add a class to a row during Json generation</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation</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/add-a-class-to-a-row-during-json-generation/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>kamass on Add a class to a row during Json generation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13687</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13687</guid>
        	        	<description><![CDATA[<p>It is normal, and I understand you don&#39;t have time to do everything people would like! <img class="spSmiley" style="margin:0" title="Wink" src="/blog/wp-content/forum-smileys/sf-wink.gif" alt="Wink" /></p>
<p>Anyway thanks again for your support.</p></p>
]]></description>
        	        	<pubDate>Fri, 08 Jan 2010 14:00:22 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Add a class to a row during Json generation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13686</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13686</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks. Will try to investigate this and if everthing is ok will implement it - but remember I do not promiese this.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 08 Jan 2010 13:52:30 +0200</pubDate>
        </item>
        <item>
        	<title>kamass on Add a class to a row during Json generation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13680</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13680</guid>
        	        	<description><![CDATA[<p>Here is the Css I have used (if people are interessed) :</p>
</p>
<p>tr.myCssClass td{<br />&#160;&#160;&#160; background-color: #F2A22F;<br />&#160;&#160;&#160; border-right: 1px solid #ddd;<br />&#160;&#160;&#160; border-bottom: 1px solid #f3f3f3;<br />}</p>
]]></description>
        	        	<pubDate>Fri, 08 Jan 2010 12:30:25 +0200</pubDate>
        </item>
        <item>
        	<title>kamass on Add a class to a row during Json generation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13679</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13679</guid>
        	        	<description><![CDATA[<p>I just hope that you&#39;ll implement this feature in the next versions of jqGrid! <img class="spSmiley" style="margin:0" title="Smile" src="/blog/wp-content/forum-smileys/sf-smile.gif" alt="Smile" /></p>
<p>I think it can be useful to a lot of people.</p>
</p>
<p>But your grid is already excellent, so... thank you for everything!</p>
]]></description>
        	        	<pubDate>Fri, 08 Jan 2010 12:20:38 +0200</pubDate>
        </item>
        <item>
        	<title>kamass on Add a class to a row during Json generation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13678</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13678</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I just want to say that I manage to do what I want by editing your JavaScript.</p>
</p>
<p>In grid.base.js :</p>
<p>Line 611 : (for Json)</p>
<p>- rowData[ari++] = "&#60;tr id=\\""+ idr +"\\" role=\\"row\\" class= \\"ui-widget-content jqgrow ui-row-"+ts.p.direction+""+cn1+"\\"&#62;";</p>
<p>+ rowData[ari++] = "&#60;tr id=\\""+ idr +"\\" role=\\"row\\" class= \\"ui-widget-content jqgrow ui-row-"+ts.p.direction+""+cn1+" " +cur["clazz"]+"\\"&#62;";</p>
</p>
<p>======================================</p>
<p>I haven&#39;t tried what is below, because I do not use Xml format.</p>
</p>
<p>Line 475--&#62;484 : (for Xml)</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if( (idn+"").indexOf("[") === -1 ) {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if (f.length) {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; getId = function( trow, k) {return $(idn,trow).text() &#124;&#124; k;<br /> &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; getClazz = function( trow, k) {return $("clazz",trow).text() &#124;&#124; k;};<br /> &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; } else {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; getId = function( trow, k) {return $(ts.p.xmlReader.cell,trow).eq(idn).text() &#124;&#124; k;<br /> &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; getClazz = function( trow, k) {return $(ts.p.xmlReader.cell,trow).eq("clazz").text() &#124;&#124; k;};<br /> &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; else {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; getId = function( trow, k) {return trow.getAttribute(idn.replace(/[\\[\\]]/g,"")) &#124;&#124; k;<br /> &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; getClazz = function( trow, k) {return trow.getAttribute("clazz".replace(/[\\[\\]]/g,"")) &#124;&#124; k;};<br /> &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }</p>
<p>Line 496--&#62;498 :</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; rid = getId(xmlr,br+j);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; rclazz = getClazz(xmlr,br+j);<br /> &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; cn1 = j%2 == 1 ? cn : &#39;&#39;;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; rowData[ari++] = "&#60;tr id=\\""+rid+"\\" role=\\"row\\" class =\\"ui-widget-content jqgrow ui-row-"+ts.p.direction+""+cn1+" "+rclazz +"\\"&#62;";</p></p>
]]></description>
        	        	<pubDate>Fri, 08 Jan 2010 12:09:57 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Add a class to a row during Json generation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13670</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13670</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Not possible for now. When using the readers with repeatitems set to false, this can be done easy, but will make a lot of code when this option is set to true.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 07 Jan 2010 21:13:29 +0200</pubDate>
        </item>
        <item>
        	<title>kamass on Add a class to a row during Json generation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13640</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/add-a-class-to-a-row-during-json-generation#p13640</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I would like to know if it&#39;s possible to add a class to a row during Json generation ?</p>
<p>Thus, I would be able to color rows thanks to css depending row values.</p>
</p>
<p>[Example]</p>
<p>&#160;&#160;&#160; $response-&#62;rows[$i][&#39;id&#39;]=$row[&#39;id&#39;];<br />&#160;&#160;&#160; $response-&#62;rows[$i][&#39;clazz&#39;]=&#39;myCssClass&#39;;<br />&#160;&#160;&#160; $response-&#62;rows[$i][&#39;cell&#39;] = array([...]);</p>
</p>
<p>Thanks.</p>
]]></description>
        	        	<pubDate>Thu, 07 Jan 2010 16:08:13 +0200</pubDate>
        </item>
</channel>
</rss>