<?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: formatter:'actions', onEdit: setColProp  </title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/formatteractions-onedit-setcolprop</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/discussion/formatteractions-onedit-setcolprop/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on formatter:'actions', onEdit: setColProp  </title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/formatteractions-onedit-setcolprop#p28867</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/formatteractions-onedit-setcolprop#p28867</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>I think I understand what you mean.</p>
<p>Short.</p>
<p>In the offical release this can not be done.</p>
<p>I have made some fixes which are in GitHub.</p>
<p>The simple solution is to dive you a possibiltiy to define the dataUrl as function.</p>
</p>
<p>With other words you will needf to use the code from GitHub.</p>
<p>In order to do this you can do something like this:</p>
<p>{name:&#39;Parent_Host&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index:&#39;Parent_Host&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width:100,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; key:true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editable:true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; edittype:&#39;select&#39;,</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editoptions : {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataUrl : function( rowid, value, name) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var cellvalue = $(this).getCell(rowid,&#39;Network_ID&#39;);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return &#39;&#60;?php echo $base_url.&#39;index.php/hosts/getListOfHosts/&#39;;?&#62;&#39; +cellvalue;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>}</p>
]]></description>
        	        	<pubDate>Thu, 23 May 2013 11:05:42 +0300</pubDate>
        </item>
        <item>
        	<title>dofamin on formatter:'actions', onEdit: setColProp  </title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/formatteractions-onedit-setcolprop#p28853</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/formatteractions-onedit-setcolprop#p28853</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>appreciate you answered.</p>
<p>Look what is the issue in my case:</p>
<ul>
<li>I&#39;m creating Grid that contains some columns, from them I have columns <strong>Parent Host </strong>and <strong>Network_ID</strong>
<p><input type='button' class='sfcodeselect' name='sfselectit7527' value='Select Code' data-codeid='sfcode7527' /></p>
<div class='sfcode' id='sfcode7527'>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#statistics&#39;).jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url:&#39;&#60;?php echo $base_url.&#39;index.php/jqgrid/statisticsHostFreeGrid/&#39;;?&#62;&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;json&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; mtype: &#39;post&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames:[&#39;&#39;,&#39;Parent Host&#39;, &#39;Network_ID&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Actions&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width:50,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; formatter:&#39;actions&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; formatoptions:{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editbutton: true,</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; onEdit: function (rowid) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var <strong>cellvalue </strong>= $(this).getCell(rowid,&#39;Network_ID&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this).setColProp(&#39;Parent_Host&#39;, {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editoptions:{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataUrl: &#39;&#60;?php echo $base_url.&#39;index.php/hosts/getListOfHosts/&#39;;?&#62;&#39;+<strong>cellvalue</strong>+&#39;&#39;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }); //setColProp ends</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } //onEdit end<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; },</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Parent_Host&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index:&#39;Parent_Host&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width:100,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; key:true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editable:true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong>edittype:&#39;select&#39;</strong></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; },</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Network_ID&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; index:&#39;Network_ID&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editable:false, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width:100,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; key:true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong>hidden: true</strong><br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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; ],//colModel</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: &#39;#statisticsPager&#39;,<br />&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum:100,<br />&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowList:[10,20,30,100],<br />&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;Host_ID&#39;,<br />&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder: &#39;asc&#39;,<br />&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; height:230,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width:&#39;100%&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; gridview: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editurl:&#39;&#60;?php echo $base_url.&#39;index.php/jqgrid/hostsGridEdit/&#39;;?&#62;&#39;+<strong>?????</strong>+&#39;&#39;</p>
</div>
</li>
<li>I need to set parameter to the Parent_Host dataUrl option, I decided to do that via onEdit in the formatter actions via setColProp because I need to know the rowid to use getCell(rowid,&#39;Network_ID&#39;); <br />But this is not working good and you said this won&#39;t work at all
</li>
<li>Also I need to set this parameter to editurl (where ???? question marks typed in)
</li>
</ul>
<p>So, I need to create a select list for column Parent Host vis some function but this function needs extra parameter - this parameter is in the hidden column Network_ID , and I need to retrieve it from Network_ID and put to the Parent Host dataUrl and also I need it in the editurl .</p>
<p>Is it a bit cleaner now to understand?</p>
</p>
<p>Thank you for your help.</p>
</p>
<p>Regards.</p>
]]></description>
        	        	<pubDate>Wed, 22 May 2013 16:12:37 +0300</pubDate>
        </item>
        <item>
        	<title>tony on formatter:'actions', onEdit: setColProp  </title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/formatteractions-onedit-setcolprop#p28851</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/formatteractions-onedit-setcolprop#p28851</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>The way way you try to do this will not work.</p>
<p>The onEdit function is executed after all server processes are executed including getting the select via dataUrl.</p>
<p>Will see how to help if I understand right the problem.</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Wed, 22 May 2013 14:46:05 +0300</pubDate>
        </item>
        <item>
        	<title>dofamin on formatter:'actions', onEdit: setColProp  </title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/formatteractions-onedit-setcolprop#p28842</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/formatteractions-onedit-setcolprop#p28842</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Sorry for my english.</p>
</p>
<p>I have formatter:&#39;actions&#39;,</p>
<p>and there is</p>
<p>onEdit: function (rowid) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var cellvalue = $(this).getCell(rowid,&#39;Network_ID&#39;); // I get here valus which needs as parameter below</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var link = &#39;&#60;?php echo $base_url.&#39;index.php/hosts/getListOfHosts/&#39;;?&#62;&#39;+cellvalue+&#39;&#39;;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this).setColProp(&#39;Parent_Host&#39;, {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editoptions:{</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataUrl: link</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }); //setColProp ends</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } //onEdit end</p>
</p>
<p>I will try to describe in my awful english -</p>
</p>
<p>when I click on the edit button, I am getting a list ( index.php/hosts/getListOfHosts -&#62; doing a list with parameter cellvalue that contained in hidden column Network_ID)</p>
<p>and at the first click this list <strong>does not </strong>appear at the Parent_Host column (in the SetColProp)</p>
<p>at the second click on another line the list shows up in the with Parent_Host column with the valid cell value (from hidden column Network_ID)&#160;</p>
<p>and clicking further below the grid lines on edit buttons, all Parent_Host are having each lists and all is ok<strong> </strong></p>
<p><strong>but </strong>when I&#39;ve got the line where the cell value (from hidden column Network_ID) another e.g. 2 instead of 1 like in previous grid lines (assume I have cellvalue = 1 from 1st -&#62; 15th and from 16th I have cellvalue = 2) <strong>then </strong>obviously I must get &#39;index.php/hosts/getListOfHosts/&#39; with parameter 2, <strong>but</strong> I am getting previous parameter 1, and such a thing happenes</p>
<p>e.g. if I click the edit on line with Network_ID = 3, then I click the edit on line with Network_ID = 6, I will got the list&#160; 1st time empty (cuz at the first click this list <strong>does not </strong>appear) and 2nd list will be with parameter 3 but real has to be 6.</p>
</p>
<p>Do you get me?</p>
</p>
<p>Apologies again for bad English.</p>
</p>
<p>Also I have to pass this cellvalue parameter (Network_ID) to the editUrl which is out of the namespace of the onEdit formatoptions of the formatter action.</p>
</p>
<p>Please kindly help me.</p>
</p>
<p>Thank you!&#160;&#160;</p>
<p><img class="spSmiley" style="margin:0" title="Cry" src="/blog/wp-content/forum-smileys/sf-cry.gif" alt="Cry" /></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 683px; width: 1px; height: 1px; overflow: hidden;">formatoptions</div>
]]></description>
        	        	<pubDate>Tue, 21 May 2013 13:00:25 +0300</pubDate>
        </item>
</channel>
</rss>