<?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: onempty set values from childs to parent</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/onempty-set-values-from-childs-to-parent</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/onempty-set-values-from-childs-to-parent/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on onempty set values from childs to parent</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/onempty-set-values-from-childs-to-parent#p15712</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/onempty-set-values-from-childs-to-parent#p15712</guid>
        	        	<description><![CDATA[<p>Ohhh. This question is really not for the jqGrid forum! But you can fill city-table based on SQL statement like</p>
<p>SELECT<br />&#160;&#160;&#160; name,<br />&#160;&#160;&#160; CASE WHEN city.lat IS NULL<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; THEN country.lat<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ELSE city.lat<br />&#160;&#160;&#160; END,<br />&#160;&#160;&#160; CASE WHEN city.lon IS NULL<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; THEN country.lon<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ELSE city.lon<br />&#160;&#160;&#160; END,<br />FROM city<br />&#160;&#160;&#160; INNER JOIN country ON city.countryId=country.id</p>
<p>Regards<br />Oleg</p></p>
]]></description>
        	        	<pubDate>Mon, 15 Mar 2010 18:57:03 +0200</pubDate>
        </item>
        <item>
        	<title>bas_vdl on onempty set values from childs to parent</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/onempty-set-values-from-childs-to-parent#p15703</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/onempty-set-values-from-childs-to-parent#p15703</guid>
        	        	<description><![CDATA[<p>i can do the logic on the server... any idea how to easily join and get the right results if city doesn&#39;t have a lat/lon value?</p>
]]></description>
        	        	<pubDate>Mon, 15 Mar 2010 16:32:25 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on onempty set values from childs to parent</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/onempty-set-values-from-childs-to-parent#p15701</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/onempty-set-values-from-childs-to-parent#p15701</guid>
        	        	<description><![CDATA[<p>It&#39;s depend on how you implemanted your master/detail example. The natural way could be place in the country grid onSelectRow event. In the event handle you could change some parameters of details grid (city grid) like title, url with respect of setCaption, setGridParam or some other methods. Then you call trigger(&#8220;reloadGrid&#8221;) on details grid. You can also use getRowData inside of event handle to get all information from selected master row.</p>
<p>All logic about reading latitude/longitude from the parent (country) can do your server.</p>
<p>If you don&#39;t have any server part of your program, you could do all works in javascript also.</p>
<p>I recommend look at <a href="http://trirand.com/blog/jqgrid/jqgrid.html" rel="nofollow" target="_blank"><a href="http://trirand.com/blog/jqgrid" rel="nofollow">http://trirand.com/blog/jqgrid</a>.....qgrid.html</a> choose Advanced and "Master Detail".</p>
<p>Best rebards<br />Oleg</p>
]]></description>
        	        	<pubDate>Mon, 15 Mar 2010 16:29:14 +0200</pubDate>
        </item>
        <item>
        	<title>bas_vdl on onempty set values from childs to parent</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/onempty-set-values-from-childs-to-parent#p15694</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/onempty-set-values-from-childs-to-parent#p15694</guid>
        	        	<description><![CDATA[<p>Hi guys,</p>
<p>i&#39;m new to jqgrid. i just build my firs grid incl. a subgrid. the parent grid is a grid with countries, the subgrid is a grid with cities. for the country i have set the latitude/longitude value. for some cities i don&#39;t have this information.</p>
<p>in the grid i want to show the latitude/longitude for the cities. but when this value is empty i want to show the latitude/longitude from the parent (country).</p>
<p>how to do this?</p>
</p>
<p>thank you in advance!</p>
</p>
<p>the data is saved in a database. two tables (<strong>country </strong>[id, name, lat, lon], <strong>city </strong>[id, countryId, name, lat, lon])</p>
]]></description>
        	        	<pubDate>Mon, 15 Mar 2010 11:16:34 +0200</pubDate>
        </item>
</channel>
</rss>