<?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: Displaying custom row content</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content</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/displaying-custom-row-content/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tacman1123 on Displaying custom row content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5776</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5776</guid>
        	        	<description><![CDATA[<p>Thanks, where is the link to download that? &#160;</p>
<p>You have this awesome jQuery plugin, but sometimes I get lost trying to find important things (demos, documentation, alpha download, this forum, etc.) &#160;Would you consider getting jqgrid.org and posting links to everything from there? &#160;Ev</p>
<p>Thanks for integrating that, can&#39;t wait to try it. &#160;How would you describe the stability for the 3.5 alpha 2 -- is it new functionality mostly that needs to be tested, or were there changes that affect the current API?</p>
<p>Thanks again, Tony. &#160;We&#39;re moving our internal database maintence system to jQuery, and your grid is at the core our UI now, so we&#39;re grateful for making this tool available.</p>
<p>Tac&#160;</p>
]]></description>
        	        	<pubDate>Thu, 02 Apr 2009 10:45:37 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Displaying custom row content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5771</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5771</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Check the new 3.5 Alfa 2. I have added additional parameter to the custom formatter which holds the entry row from the server adain with the id.</p>
<p>Regards</p>
<p>and Thanks for the fix</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 02 Apr 2009 10:36:16 +0300</pubDate>
        </item>
        <item>
        	<title>tacman1123 on Displaying custom row content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5743</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5743</guid>
        	        	<description><![CDATA[<p>Yes, that would be terrific. &#160;Even better would be named pairs, e.g.&#160;</p>
</p>
<p>[</p>
<p>{"id":5, cell:{first:"Fred",&#160;last:"Flintstone",&#160;city:"Bedrock"<span class="codestring">}</span>&#160;},</p>
<p>]</p>
<p>I know the data can be passed in that way, but I usually pass it in as an array, because the data is so much smaller that way. &#160;Or if you could show how to get the id from a name, I know there&#39;s a method that gets the column index from a name, but I couldn&#39;t figure out how to call it from within the formatter.</p>
<p>At the moment, we&#39;ve rewritten things to use afterRowInsert, but I think that&#39;s more complicated. &#160;A&#160;colleague and I spent most of the day working on this yesterday, he found a issue related to this:</p>
<p>--</p>
<p>I discovered why the rowdata argument is always empty for afterInsertRow. &#160;There&#39;s a variable rd in grid.base.js that&#39;s initialized to [] and then later it tries to put data into it like this:</p>
<p>rd[ts.p.colModel[j+gi+si].name] = cur[j];</p>
<p>That is, it&#39;s initialized as an empty array and then treated as an object (with name rather than numeric indexes). &#160;Apparently in that situation JavaScript [appears to ignores the assignment, and rd acts an empty array].</p>
<p>It should be initialized to {}, an empty object, in which case everything works fine. &#160;I should be able to simplify that afterInsertRow code now.</p>
<p>FOLLOW-UP:</p>
<p>Hmm, actually it looks like the data does go in, but it doesn&#39;t show up when iterating through the array. &#160;You have to know what the keys are and specifically ask for the elements. &#160;So the data isn&#39;t lost, just hard to find.</p>
<p>The bottom line remains to be careful not to use non-numeric keys in a JS array. &#160;They don&#39;t get magically converted to numbers, but the resulting array doesn&#39;t act quite like an object/hash either.</p>
<p>---</p>
<p>Tac</p>
]]></description>
        	        	<pubDate>Wed, 01 Apr 2009 06:19:49 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Displaying custom row content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5723</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5723</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks for this. I was thinking about this for some time and will say - Yes &#160; it is possible with some limitations. I will pass to the formatter the entry row in format which is obtained from the server - with other words if you have data in format</p>
<p>[</p>
<p>...</p>
<p>{"id":5, cell:[<span class="codestring">"cell11"</span>, <span class="codestring">"cell12"</span>, <span class="codestring">"cell13"</span>] },</p>
<p>...</p>
<p>]</p>
<p>Again with the cell value you will have a array of&#160; [<span class="codestring">"cell11"</span>, <span class="codestring">"cell12"</span>, <span class="codestring">"cell13"</span>]</p>
<p>What do you think will this do the job?</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 01 Apr 2009 02:56:26 +0300</pubDate>
        </item>
        <item>
        	<title>tacman1123 on Displaying custom row content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5698</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5698</guid>
        	        	<description><![CDATA[<p>I&#39;m having a similar issue, and would like to solve it using formatter. &#160;Let&#39;s say I have 4 columns, addr, city, state, zip. &#160;I want to display an address block in the custom formatter that looks like addr&#60;br /&#62;city, state zip. &#160;I create a column called address_block and set the formatter to format_address_block</p>
<p>My custom format function declaration is</p>
<p>format_address_block = function(el, cellval, opts){...</p>
<p>in theory, opts returns rowData, but this is not the raw data that I&#39;d like to see from the json data that&#39;s sent to populate the table, but rather the tr element and all the formatting. &#160;So from here, I don&#39;t know how to fill the cell based on data from other cells in the same row.</p>
<p>Is it possible to also pass the actual data from the row to my custom formatter?Then it would be relatively easy to solve. &#160;Maybe a 3.5 addition?</p>
<p>I realize there are other solutions -- formatting the data in the json requst (not really a good plan), or using setCell in afterRowInsert, but both of these add complications that I&#39;d rather have formatter deal with.</p>
<p>A related question: once I have this address block, I&#39;ll obviously want to hide the individual fields during the grid display, and show the address block, but the reverse will be true when I edit. &#160;That doesn&#39;t seem to be working, if I have in the colModel "hidden":true and also "editable":true, the field still doesn&#39;t show up in the edit.</p>
<p>Thanks! &#160;I&#39;ve been staring at this now for a while, I&#39;d love some pointers toward a solution.</p>
<p>Tac</p>
<div></div></p>
]]></description>
        	        	<pubDate>Tue, 31 Mar 2009 06:52:20 +0300</pubDate>
        </item>
        <item>
        	<title>thomaslundstrom on Displaying custom row content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5333</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5333</guid>
        	        	<description><![CDATA[<p>Hi, I got it working by hiding all the data columns and then hooking onto the loadComplete event instead of a custom formatter, creating the UI there.</p>
]]></description>
        	        	<pubDate>Fri, 13 Mar 2009 11:57:09 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Displaying custom row content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5329</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5329</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Maybe a good solution here is to use afterInsertRow (where all the row data is available) and setCell method to set the first column data depending on others.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 13 Mar 2009 10:26:10 +0200</pubDate>
        </item>
        <item>
        	<title>thomaslundstrom on Displaying custom row content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5312</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5312</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I tried using a custom formatter, but didn&#39;t get it working like I wanted. My approach was:</p>
<p>1. Have a grid with 5 different columns, but only the first column is shown. The other columns are used to transport the data that should be visible in the first column</p>
<p>2. The first column has a custom formatter</p>
<p>3. In the custom formatter, I tried to get data from the other columns, in order to build the custom html, but I couldn&#39;t find the data in any property of the formatter parameters</p>
<p>Is it possible to get data from other columns when doing custom formatting for one column?</p>
]]></description>
        	        	<pubDate>Fri, 13 Mar 2009 06:56:27 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Displaying custom row content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5282</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5282</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Using a custom formatter I think will do the job. Maybe you will need to ajust the cell displaying using the setCell method. Refer to docs.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 12 Mar 2009 11:45:21 +0200</pubDate>
        </item>
        <item>
        	<title>thomaslundstrom on Displaying custom row content</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5246</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/displaying-custom-row-content#p5246</guid>
        	        	<description><![CDATA[<p>Hi, I am thinking of implementing a search browser using JqGrid. The reason why I would like to choose JqGrid is that we use it in other places of our product and I like the way I can use it to implement paging etc.</p>
<p>I&#39;d like to be able to format the search results somewhat like Google formats its search results, i.e. in a list.</p>
<p>How would I do this using JqGrid? I&#39;ve noticed that I can use a grid with one visible column and create HTML on the server side. The HTML is then displayed as each cell&#39;s content, and everything looks fine. Creating markup and sending it over JSON is however a quite ugly solution.</p>
<p>I would like to be able to transmit a row of data to JqGrid, and extract the data in a formatter function, and then format the data on the client side, preferably with the plugin jTemplates. Is it possible to get hold of the entire row&#39;s data in a cell formatter? If I could do that, I could create the custom HTML on the client side instead.</p>
]]></description>
        	        	<pubDate>Wed, 11 Mar 2009 10:08:22 +0200</pubDate>
        </item>
</channel>
</rss>