<?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: Dynamic dataurl for select lists</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-dataurl-for-select-lists</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/dynamic-dataurl-for-select-lists/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Ken on Dynamic dataurl for select lists</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/dynamic-dataurl-for-select-lists#p24081</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/dynamic-dataurl-for-select-lists#p24081</guid>
        	        	<description><![CDATA[<p>&#160;</p>
<p class="western">Hi all</p>
<p class="western">I have been trying to solve a problem for a couple of days. I am simply trying to add a onchange function to a select tag. Example: &#60;select onchange="javascript:doThisFunction()"&#62; &#8230;.</p>
<p class="western">I have tried the following:</p>
<ol>
<li>
<p class="western">Hard coding the onchange into the ajax page which returns the constructed select and options. This then gets removed by jqgrid and so is no good.</p>
</li>
<li>
<p class="western">Using onSelectRow</p>
</li>
</ol>
<p class="western">&#8230;..</p>
<p class="western">,dataEvents: [</p>
<p class="western" align="left">{ type: &#39;change&#39;,</p>
<p class="western" align="left">fn: <strong>function</strong>(formid) {</p>
<p class="western" align="left">alert(&#39;change event&#39;);</p>
<p class="western" align="left">}</p>
<p class="western" align="left">}</p>
<p class="western" align="left">]</p>
<p class="western">These events do NOT fire. Everything else will work but not the events when used with the setColProp. I don&#39;t know why.</p>
<p class="western">$("#FTPvariations").jqGrid(&#39;setColProp&#39;,&#39;temporary_post_rate&#39;&#8230;</p>
<p class="western">&#160;</p>
<ol>
<li>
<ol>
<p class="western">I have has some success with using the onSelectRow but only when I have an alert before the select boxes are generated. I have tried using a timeout function but still does not work correctly.</p>
</ol>
</li>
</ol>
<p class="western">
<p class="western">Here is what I am trying to achieve:</p>
<p class="western">Select boxes are dynamically populated for each row. When the user selects an option form the select boxes, this fires a function which populates a value of a cell&#160;from that option.</p>
<p class="western">The select boxes contains data which is unique to each row.</p>
<p class="western">
<p class="western">I have been trying to set a dynamic dataurl in the colmodel but this also does not work unless hard coded</p>
<p class="western">ajax_dataUrl+&#39;1255&#39; (for eample)</p>
<p class="western">
<p class="western">This &#39;1255&#39; is an ID which I tried to get from the selrow using the getGridParam method which I need to pass to the ajax creation page.</p>
<p class="western">
<p class="western">Like I say, all I need to do is call a function from an onselect event. I have even tried to add this to the select at time of creation from the onSelectRow but no success.</p>
<p class="western">
<p class="western">Does anyone have any ideas or examples on how to do this? It&#39;s important that I have unique data in the select boxes for each row other than that it sounds pretty simple but it&#39;s driving me mad <img class="wp-smiley" src="/blog/wp-includes/images/smilies/icon_sad.gif" alt=":(" /></p>
<p class="western">
<p class="western">Thanks all and I hope this is clear to anyone reading it.</p>
<p class="western">
<p class="western">Regards Ken</p>
<p class="western">&#160;</p>
]]></description>
        	        	<pubDate>Thu, 28 Jul 2011 14:27:59 +0300</pubDate>
        </item>
</channel>
</rss>