<?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: saveRow Function</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/saverow-function</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/saverow-function/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on saveRow Function</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/saverow-function#p5613</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/saverow-function#p5613</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I suggest in this case to use own ajax something like this:</p>
<p>onClickButton:function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var gsr = jQuery(&#39;#hours&#39;).getGridParam(&#39;selrow&#39;);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var data = jQuery(&#39;#hours&#39;).getRowData(gsr);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var id = data.ID;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var tid = &#8220;PROJECTHOURS&#8221;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var aurl = &#8220;./actions/ApproveEntry.php&#8221;;<br />ajax({</p>
<p>url:aurl,</p>
<p>data:.....</p>
<p>complete : function (){</p>
<p>....<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#hours&#39;).trigger(&#8221;reloadGrid&#8221;);</p>
<p>...</p>
<p>}</p>
<p>});</p>
<p>}</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 26 Mar 2009 03:00:46 +0200</pubDate>
        </item>
        <item>
        	<title>Nathan on saveRow Function</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/saverow-function#p5564</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/saverow-function#p5564</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>How do you set the row to editable ?</p>
<p>Currently I have that the field is editable:</p>
</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name: &#39;APPROVED&#39;, width:75, editable:true, align:&#39;center&#39;,editrules:{required:true}, edittype:"checkbox",editoptions:{value:"1:0"},formatter:&#39;checkbox&#39;}</p>
<p>What I would like to do is have this appear in the table(checked or unchecked) but not appear on the form.&#160; Project managers should be able to select items from the grid and jus click approve.</p>
<p>Any suggestions on why my script does not fire ?</p>
<p>.navButtonAdd(&#39;#hoursNav&#39;,{buttonimg:"./css/artwork/icons/10/checkmark-10.gif",caption:"Approve Item",position:"last",title:"Approve&#160; Item", onClickButton:function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var gsr = jQuery(&#39;#hours&#39;).getGridParam(&#39;selrow&#39;);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var data = jQuery(&#39;#hours&#39;).getRowData(gsr);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var id = data.ID;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var tid = "PROJECTHOURS"<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var aurl = "./actions/ApproveEntry.php";<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#hours&#39;).saveRow(id,editurl=aurl,extraparam={&#39;table&#39;:tid,&#39;approved&#39;:1});<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#hours&#39;).trigger("reloadGrid");<br />&#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; });</p>
<p>Thanks,</p>
<p>Nathan</p>
]]></description>
        	        	<pubDate>Tue, 24 Mar 2009 06:53:32 +0200</pubDate>
        </item>
        <item>
        	<title>tony on saveRow Function</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/saverow-function#p5547</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/saverow-function#p5547</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>In order to work this the new added rows should have a attribute editable=1 - i.e the table row should have attribute editable=1</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 24 Mar 2009 02:36:12 +0200</pubDate>
        </item>
        <item>
        	<title>Nathan on saveRow Function</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/saverow-function#p5523</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/saverow-function#p5523</guid>
        	        	<description><![CDATA[<p>Hi,</p>
</p>
<p>I&#39;ve added an extra button on the nav bar which allows managers to approve items added to the grid.&#160; The button adds just fine and the function fires for the button click event but the saveRow call never forward to my url.&#160; I have some debug lines of code in ApproveEntry.php and nothing is routed to the console but the grid reloads afterwards.</p>
<p>Any suggestions ? Perhaps I am using the saveRow method in a wrong context but this seems correct.</p>
<p>Snippet of Code:</p>
<p>.navButtonAdd(&#39;#hoursNav&#39;,{buttonimg:"./css/artwork/icons/10/checkmark-10.gif",caption:"Approve Item",position:"last",title:"Approve&#160; Item", onClickButton:function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var gsr = jQuery(&#39;#hours&#39;).getGridParam(&#39;selrow&#39;);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var data = jQuery(&#39;#hours&#39;).getRowData(gsr);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var id = data.ID;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var tid = "PROJECTHOURS"<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var aurl = "./actions/ApproveEntry.php";<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#hours&#39;).saveRow(id,false,aurl,{&#39;table&#39;:tid});<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#hours&#39;).trigger("reloadGrid");<br />&#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; });</p>
<p>Nathan</p>
]]></description>
        	        	<pubDate>Mon, 23 Mar 2009 09:33:00 +0200</pubDate>
        </item>
</channel>
</rss>