<?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: Number validation using custom_func</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/number-validation-using-custom_func-2</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/number-validation-using-custom_func-2/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>sudheer on Number validation using custom_func</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/number-validation-using-custom_func-2#p26453</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/number-validation-using-custom_func-2#p26453</guid>
        	        	<description><![CDATA[<div id="post26451">
<p>Hi,</p>
<p>&#160;&#160;&#160;&#160; I am performing number validaton on specific column. when i  click on submit it validates the input and if it is true i return  [true,""]. but at the top of the form dialog an empty message is  displaying with red color background and not able to save the data.</p>
</p>
<p>Please check my code</p>
<p>function CheckForN(value, colname) {<br />&#160;&#160;&#160; debugger;<br />&#160;&#160;&#160; var a = Number(value);<br />&#160;&#160;&#160; var msg ;<br />&#160;&#160;&#160; if ( a.toString() == &#39;NaN&#39; &#124;&#124; typeof a == &#39;undefined&#39; &#124;&#124; typeof a == null &#124;&#124; typeof a == &#39;null&#39; &#124;&#124; a == NaN) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; msg = &#39;Enter Valid Number for &#39; + colname;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#divModal&#39;).html(msg);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;  $("#divModal").dialog("option", "buttons", { "Close": function () {  $(this).dialog("close"); $("#divModal").html("");&#160; } });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; //$(&#39;#&#39; + id[0].trim()).focus();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; //$(&#39;#closedialog&#39;).click();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; //$(&#39;#info_dialog&#39;).hide()<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; //$(&#39;#divModal&#39;).dialog({ open: function (event, ui) { $(&#39;#divModal&#39;).focus(); } });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#divModal&#39;).dialog(&#39;open&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; //$(&#39;#Phone&#39;).keyup();&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; //$(&#39;#info_dialog&#39;).focus(function () { $(&#39;#info_dialog&#39;).hide(); });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; //$(&#39;#info_dialog&#39;).hide()&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return [false, msg];<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; else {<br />&#160;&#160;&#160;&#160;&#160;&#160; // $(&#39;#FormError&#39;).hide();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return [true, ""];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; msg = "";<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; return [true,""]<br />}</p>
</p>
<p>i am calling above function for number column. for all other columns it is working fine. Please give your suggestions.</p>
</div>
]]></description>
        	        	<pubDate>Mon, 23 Apr 2012 08:18:09 +0300</pubDate>
        </item>
</channel>
</rss>