<?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: Form edit: Save record on previous/next</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext</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/form-edit-save-record-on-previousnext/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Reg on Form edit: Save record on previous/next</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19535</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19535</guid>
        	        	<description><![CDATA[<p>Hello Oleg,</p>
<p>Thanks for your suggestion. That works for me, so I&#39;m a happy camper again.</p>
<p>Reg</p></p>
]]></description>
        	        	<pubDate>Sun, 05 Sep 2010 20:29:11 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on Form edit: Save record on previous/next</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19506</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19506</guid>
        	        	<description><![CDATA[<p>Hi Reg,</p>
<p>You can try to use</p>
<p><span style="font-size: 13.8889px;">&#160;&#160; &#160;$("#sData", "#"+frmtb+"_2").trigger("click");</span></p>
<p><span style="font-size: 13.8889px;">instead of $("#sData",formid).trigger("click");&#160;where frmtb is a string "TblGrid_"+gID, where gID is the id of your jqGrid. Because id of your grid is "tblmarks", then you cat try simulate saving with respect of</span></p>
<p><span style="font-size: 13.8889px;">&#160;&#160; &#160;$("#sData", "#TblGrid_tblmarks_2").trigger("click");</span></p>
<p><span style="font-size: 13.8889px;">or</span></p>
<p><span style="font-size: 13.8889px;">&#160;&#160; &#160;$("#sData", "table.EditTable#TblGrid_tblmarks_2").trigger("click");</span></p>
<p><span style="font-size: 13.8889px;">Best regards<br />Oleg&#160;</span></p>
]]></description>
        	        	<pubDate>Fri, 03 Sep 2010 00:54:31 +0300</pubDate>
        </item>
        <item>
        	<title>Reg on Form edit: Save record on previous/next</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19503</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19503</guid>
        	        	<description><![CDATA[<p>It&#39;s not working for me &#8211;</p>
<p>First problem I had is that I added this event to the grid definition, not the modal form definition &#8212; once I had that fixed, things went better.</p>
<p>I&#39;ve&#160;inserted an Alert() to tell me if the event is being called, and when I press enter on the next button, the alert message appears and I&#160;move to the next record. But there is no hit on my server to do a save.</p>
<p>My code looks like this:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6775' value='Select Code' data-codeid='sfcode6775' /></p>
<div class='sfcode' id='sfcode6775'>var editprm = {<br />&#160;&#160;&#160; jqModal: false,<br />&#160;&#160;&#160; editCaption: &#34;Edit a Student&#39;s Mark&#34;,<br />&#160;&#160;&#160; top: 0,<br />&#160;&#160;&#160; left: 50,<br />&#160;&#160;&#160; width: 600,<br />&#160;&#160;&#160; height: 400,<br />&#160;&#160;&#160; onclickPgButtons: function (which, formid, rowid) { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; alert(which + &#34; button clicked on &#34; + formid ); <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#34;#sData&#34;,formid).trigger(&#34;click&#34;); <br />&#160;&#160;&#160;&#160;&#160; }, <br />&#160;&#160;&#160; reloadAfterSubmit:true,<br />&#160;&#160;&#160; closeAfterEdit:true<br />&#160; };</div>
<p>The alert message is "next button clicked on [object Object]"</p>
<p>My grid definition is as follows:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8408' value='Select Code' data-codeid='sfcode8408' /></p>
<div class='sfcode' id='sfcode8408'>&#160;&#160; $(&#34;#tblmarks&#34;).jqGrid( { <br />&#160;&#160;&#160;&#160;&#160; url: &#39;wc.dll?CMProcess~AjaxGet~&#38;amp;Data=Grades&#38;amp;Key=&#38;amp;Same=.F.&#38;amp;sk=30R0TFL6417744&#38;amp;sh=39&#39;, <br />&#160;&#160;&#160;&#160;&#160; datatype: &#39;xml&#39;, <br />&#160;&#160;&#160;&#160;&#160; colNames: [&#39;Student&#39;,&#39;Mark&#39;,&#39;Seconds&#39;,&#39;Comments&#39;], <br />&#160;&#160;&#160;&#160;&#160; colModel: [{name:&#39;member&#39;, sortable:false, width:150 }, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;mark&#39;, sortable:false, editable:true, width:35 }, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;timetaken&#39;, sortable:false, editable:true, width:55 },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;comments&#39;, sortable:false, editable:true, edittype:&#39;textarea&#39;, editoptions:{rows:&#39;8&#39;,cols:&#39;60&#39;}, width:300 }], <br />&#160;&#160;&#160;&#160;&#160; height: &#39;auto&#39;, <br />&#160;&#160;&#160;&#160;&#160; altRows: true, <br />&#160;&#160;&#160;&#160;&#160; altclass: &#39;ui-priority-secondary&#39;, <br />&#160;&#160;&#160;&#160;&#160; gridview: true, <br />&#160;&#160;&#160;&#160;&#160; rowList:[10,25,50,100,999], <br />&#160;&#160;&#160;&#160;&#160; page: 1, <br />&#160;&#160;&#160;&#160;&#160; rowNum:999, <br />&#160;&#160;&#160;&#160;&#160; loadui: &#39;block&#39;, <br />&#160;&#160;&#160;&#160;&#160; viewsortcols: [true,&#39;horizontal&#39;,true], <br />&#160;&#160;&#160;&#160;&#160; hidegrid: false, <br />&#160;&#160;&#160;&#160;&#160; caption: &#39;Enter Student Marks&#39;, <br />&#160;&#160;&#160;&#160;&#160; editurl:&#39;wc.dll?CMProcess~AjaxPut~&#38;amp;Data=Grades&#38;amp;sk=30R0TFL6417744&#38;amp;sh=39&#39;, <br />&#160;&#160;&#160;&#160;&#160; loadError: function(xhr,st,err) { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#34;#tblmarksMessage&#34;).html(&#34;Type: &#34;+st+&#34;; Response: &#34;+ xhr.status + &#34; &#34;+xhr.statusText);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }, <br />&#160;&#160;&#160;&#160;&#160; ondblClickRow: function(rowid) { $(&#34;#tblmarks&#34;).editGridRow(rowid,editprm);}, <br />&#160;&#160;&#160;&#160;&#160; loadComplete: function() { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160; });&#160; <br />&#160;&#160;&#160; $(&#34;#tblmarks&#34;).navGrid(&#39;#tblmarksPager&#39;,{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; add:false,edit:true, edittext:&#39;Edit&#39;,del:false,search:false,refresh:true<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; editprm, // edit<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {}, // add<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {} // delete<br />&#160;&#160;&#160;&#160; )</div>
<p>Any idea what I am doing wrong?</p>
<p>Tony, can you help?</p>
</p>
<p>Thanks,</p>
<p>Reg</p></p>
]]></description>
        	        	<pubDate>Thu, 02 Sep 2010 23:43:07 +0300</pubDate>
        </item>
        <item>
        	<title>psparta on Form edit: Save record on previous/next</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19471</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19471</guid>
        	        	<description><![CDATA[<blockquote>
</blockquote>
<blockquote>
<p>Estimados:</p>
</blockquote>
<blockquote>
<p>Con este peque&#241;o cambio funcion&#243; OK:</p>
</blockquote>
<blockquote>
<p><strong>&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; onclickPgButtons: function(which, formid, rowid) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; <span style="color: #800000;">jQuery(&#39;#sData&#39;).trigger(&#39;click&#39;);</span><br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; },</strong></p>
</blockquote>
<blockquote>
<p>Saludos y gracias por el post.</p>
</blockquote>
]]></description>
        	        	<pubDate>Wed, 01 Sep 2010 22:26:22 +0300</pubDate>
        </item>
        <item>
        	<title>Seroczynski on Form edit: Save record on previous/next</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19369</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19369</guid>
        	        	<description><![CDATA[<p>I&#39;m sorry to bump this thread, however I expected this to be a feature which wouldn&#39;t only benefit me. This would actually increase the fool-proofness of the entire jqGrid 🙂</p>
]]></description>
        	        	<pubDate>Fri, 27 Aug 2010 17:50:14 +0300</pubDate>
        </item>
        <item>
        	<title>Seroczynski on Form edit: Save record on previous/next</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19273</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19273</guid>
        	        	<description><![CDATA[<p>So I&#39;ve found out I should use &#39;onclickPgButtons&#39; and found a topic <a href="http://www.trirand.com/blog/?page_id=393/help/add-form-labels/&#38;value=onclickPgButtons&#38;type=3&#38;include=1&#38;search=1" target="_blank">here</a> where someone asks for an example and it seems to work for him (or her). However, I can&#39;t get it to work. Is there any place where I could get to see some kind of an example of some sort?</p>
</p>
<p>My current code: </p>
<p><input type='button' class='sfcodeselect' name='sfselectit1171' value='Select Code' data-codeid='sfcode1171' /></p>
<div class='sfcode' id='sfcode1171'>... jqGrid definition ...</p>
<p>...</p>
<p>onclickPgButtons: function(which, formid, rowid) {<br />jQuery(&#39;#sData&#39;, formid).trigger(&#39;click&#39;);&#160;&#160;&#160;&#160; <br />},</p>
<p>...</p>
</div>
<p>Is "#sData" a predefined parameter or value? Because in the example I got from the other topic it get&#39;s followed by the var &#39;formid&#39;.</p>
</p>
<p>I&#39;m starting to get confused and could use some help here, thanks in advance.</p>
]]></description>
        	        	<pubDate>Tue, 24 Aug 2010 13:48:55 +0300</pubDate>
        </item>
        <item>
        	<title>Seroczynski on Form edit: Save record on previous/next</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19270</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/form-edit-save-record-on-previousnext#p19270</guid>
        	        	<description><![CDATA[<p>Hey all,</p>
</p>
<p>I&#39;ve searched the forum with no succes, therefor I&#39;m asking if anyone knows how I&#39;d be able to make sure the following works.</p>
</p>
<p>I&#39;d like to be able to save a record when the user uses one of the navigation buttons found at the lower-left bottom of the form edit (default settings). Now the user has to manually press the save button or else he/she will lose any changes that have been made to the record.</p>
</p>
<p>Thanks in advance for any help or hints toward the right directions <img class="wp-smiley" src="/blog/wp-includes/images/smilies/icon_wink.gif" alt=";)" /></p>
</p>
<p><strong>Edit:</strong> I&#39;ve found some more information at <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing" target="_blank">the Wiki</a>, I&#39;ll be sure to check this out and reply with my findings.</p>
]]></description>
        	        	<pubDate>Tue, 24 Aug 2010 11:47:52 +0300</pubDate>
        </item>
</channel>
</rss>