<?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: How do I pass data to my editurl?</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-do-i-pass-data-to-my-editurl</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/how-do-i-pass-data-to-my-editurl/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>sepoto on How do I pass data to my editurl?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/how-do-i-pass-data-to-my-editurl#p28416</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/how-do-i-pass-data-to-my-editurl#p28416</guid>
        	        	<description><![CDATA[<p>Does anyone know how I am supposed to get the current rows data to my editurl PHP script? The grid is set up for inline editing. My navigator has both the regular form edit, inline edit and save disk button. I would like a way to tap into the save disk button as well..</p>
<p>[CODE]</p>
<p>&#60;?php</p>
<p>session_start();</p>
</p>
<p>if($_SESSION[&#39;loggedin&#39;] != TRUE)</p>
<p>{</p>
<p>header("Location: index.php");</p>
<p>}</p>
<p>?&#62;</p>
<p>&#60;!DOCTYPE html&#62;</p>
<p>&#60;html&#62;</p>
<p>&#60;head&#62;</p>
<p>&#60;title&#62;&#60;/title&#62;</p>
<p>&#60;style&#62;</p>
<p>body { background-color: grey; }</p>
<p>#main-wrapper { margin-left: auto; margin-right: auto; width: 1238px; border-left: 1px solid black; border-right: 1px solid black; }</p>
<p>&#60;/style&#62;</p>
</p>
<p>&#60;link rel="stylesheet" type="text/css" media="screen" href="jqueryui/css/smoothness/jquery-ui-1.9.2.custom.min.css" /&#62;</p>
<p>&#60;link rel="stylesheet" type="text/css" media="screen" href="jqgrid/css/ui.jqgrid.css" /&#62;</p>
</p>
<p>&#60;script src="jquery/jquery.min.js" type="text/javascript"&#62;&#60;/script&#62;</p>
<p>&#60;script src="jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"&#62;&#60;/script&#62;</p>
<p>&#60;script src="jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"&#62;&#60;/script&#62;</p>
</p>
<p>&#60;script type="text/javascript"&#62;</p>
<p>$(function(){</p>
</p>
<p>var lastSel;</p>
<p>jQuery("#grid-customers").jqGrid({</p>
<p>url:&#39;php.scripts/get.customers.php&#39;,</p>
<p>datatype: &#39;xml&#39;,</p>
<p>mtype: &#39;POST&#39;,</p>
<p>colNames:[&#39;idcustomers&#39;,&#39;firstname&#39;, &#39;lastname&#39;,&#39;address1&#39;,&#39;address2&#39;,&#39;city&#39;,&#39;state&#39;,&#39;zip&#39;,&#39;phone&#39;,&#39;email&#39;,&#39;cell&#39;],</p>
<p>colModel :[</p>
<p>{name:&#39;idcustomers&#39;, index:&#39;idcustomers&#39;, width:55, editable: true},</p>
<p>{name:&#39;firstname&#39;, index:&#39;firstname&#39;, width:90, editable: true},</p>
<p>{name:&#39;lastname&#39;, index:&#39;lastname&#39;, width:90, editable: true},</p>
<p>{name:&#39;address1&#39;, index:&#39;address1&#39;, width:90, editable: true},</p>
<p>{name:&#39;address2&#39;, index:&#39;address2&#39;, width:90, editable: true},</p>
<p>{name:&#39;city&#39;, index:&#39;city&#39;, width:90, editable: true},</p>
<p>{name:&#39;state&#39;, index:&#39;state&#39;, width:90, editable: true},</p>
<p>{name:&#39;zip&#39;, index:&#39;zip&#39;, width:90, editable: true},</p>
<p>{name:&#39;phone&#39;, index:&#39;phone&#39;, width:90, editable: true},</p>
<p>{name:&#39;email&#39;, index:&#39;email&#39;, width:90, editable: true},</p>
<p>{name:&#39;cell&#39;, index:&#39;cell&#39;, width:90, editable: true}</p>
<p>],</p>
<p>pager: &#39;#grid-customers-pager&#39;,</p>
<p>rowNum:10,</p>
<p>rowList:[10,20,30],</p>
<p>sortname: &#39;idcustomers&#39;,</p>
<p>sortorder: &#39;desc&#39;,</p>
<p>viewrecords: true,</p>
<p>gridview: true,</p>
<p>caption: &#39;Customers&#39;,</p>
<p>height: 375,</p>
<p>onSelectRow: function(id){</p>
<p>if(id &#38;&#38; id!==lastSel){</p>
<p>jQuery(this).restoreRow(lastSel);</p>
<p>lastSel=id;</p>
<p>alert(id);</p>
<p>}</p>
<p>//jQuery(this).editRow(id, true);</p>
<p>},</p>
<p>editurl: &#39;php.scripts/update.row.php&#39;,</p>
<p>saveRow: function(rowid) {</p>
<p>alert("Alert Sepy!");</p>
<p>}</p>
<p>}).navGrid(&#39;#grid-customers-pager&#39;,{}, {}, {}, {}, {}, {}).inlineNav("#grid-customers-pager",{});</p>
</p>
<p>});</p>
</p>
<p>&#60;/script&#62;</p>
</p>
<p>&#60;/head&#62;</p>
</p>
<p>&#60;body&#62;</p>
</p>
<p>&#60;div id="main-wrapper"&#62;</p>
<p>&#60;input id="button-logout" type="button" style="margin-left: 1170px;" value="logout"&#62;</p>
<p>&#60;div style="margin: 0px; padding: 0px; margin-left: auto; margin-right: auto; width: 1200px;"&#62;</p>
<p>&#60;table id="grid-customers"&#62;&#60;tr&#62;&#60;td/&#62;&#60;/tr&#62;&#60;/table&#62;</p>
<p>&#60;div id="grid-customers-pager"&#62;&#60;/div&#62;</p>
<p>&#60;br&#62;</p>
</p>
<p>&#60;/div&#62;</p>
<p>&#60;/div&#62;</p>
</p>
<p>&#60;script type="text/javascript"&#62;</p>
</p>
<p>$("#button-logout").click(function() {</p>
<p>$.ajax({</p>
<p>type: "POST",</p>
<p>url: "php.scripts/logout.php",</p>
<p>data: {}</p>
<p>}).done(function( msg ) {</p>
<p>//alert( "Data Saved: " + msg );</p>
<p>window.location = "index.php";</p>
<p>});</p>
<p>});</p>
<p>&#60;/script&#62;</p>
<p>&#60;/body&#62;</p>
</p>
<p>&#60;/html&#62;</p>
</p>
<p>[/CODE]</p>
]]></description>
        	        	<pubDate>Sun, 10 Mar 2013 03:37:41 +0200</pubDate>
        </item>
</channel>
</rss>