<?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: While adding a row afterSubmit event is not getting fired?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/while-adding-a-row-aftersubmit-event-is-not-getting-fired</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/while-adding-a-row-aftersubmit-event-is-not-getting-fired/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>shaliniforever29 on While adding a row afterSubmit event is not getting fired?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/while-adding-a-row-aftersubmit-event-is-not-getting-fired#p23525</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/while-adding-a-row-aftersubmit-event-is-not-getting-fired#p23525</guid>
        	        	<description><![CDATA[<p>I am using a form editing in jqgrid. While editing a row using editUrl afterSubmit events is working fine. but at the time of adding a row its not getting fired.</p>
<p>(I am using a server side validations for form editing. i have to check the response and show the message according to the response of the add function. in case of editing this is working fine. In case of add the form gets closed)</p>
</p>
<p>$("#admingrid19").jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: basepath+&#39;admins/json_dosimage_list/&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: "json",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames:[&#39;&#39;,&#39;DOS Image&#39;, &#39;Status&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel:[<br />&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;id&#39;, index:&#39;id&#39;, width: colWidth1, align:"left", sortable: false},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;name&#39;, index:&#39;name&#39;, width: colWidth2, align:"left", sortable:true,editoptions:{maxlength:30}, editable : true, editrules:{required:true}},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;status&#39;, index:&#39;status&#39;, width: colWidth3, align:"left", sortable:true}<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ],</p>
<p>----</p>
<p>-----</p>
<p>----</p>
<p>----,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: strDosImageDescription,<br />&#160;&#160; &#160;&#160;&#160; &#160;editurl:basepath + "dosimage/add"<br />&#160;&#160;&#160; }).navGrid("#adminpager19",{edit:true,edittext:&#39;&#60;span class=gridpagerbutton&#62;Edit&#60;/span&#62;&#39;,<span style="color: #993300;">add:true,</span>addtext:&#39;&#60;span class=gridpagerbutton&#62;Add&#60;/span&#62;&#39;,del:false,search:false,refreshtext:&#39;&#60;span class=gridpagerbutton&#62;Refresh&#60;/span&#62;&#39;},{reloadAfterSubmit: true, closeOnEscape: true, closeAfterEdit: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: #993300;"> afterSubmit: function(response, postdata) { &#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; if (response.responseText == "success") {&#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; jQuery("#success").html("DOS image updated sucessfully.");&#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;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return [true,&#39;&#39;]; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else if (response.responseText == "duplicate") {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;return [false, &#39;This DOS image already exists.&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return[false, &#39;Only alphabets are allowed.&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;</span></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }}<br />&#160;&#160;&#160; )</p>
</p>
<p>Thanks in Advance!!!!!</p></p>
]]></description>
        	        	<pubDate>Wed, 08 Jun 2011 11:42:43 +0300</pubDate>
        </item>
</channel>
</rss>