<?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 to add a custome validation in JqGrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-add-a-custome-validation-in-jqgrid</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/how-to-add-a-custome-validation-in-jqgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>vikram on How to add a custome validation in JqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-add-a-custome-validation-in-jqgrid#p28326</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-add-a-custome-validation-in-jqgrid#p28326</guid>
        	        	<description><![CDATA[<p>I have to check that the record/name is present or not in the generated list means unique name. I have two column in which one is unique so while adding a new entry i need to check that the new name is present or not.</p>
<p>For this i m using the below code but it is not working. can anyne please help me out.</p>
<p>&#160;custom:true,custom_func: function(value,colname){<br />&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; var flag = false;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var allRowsInGrid=$("#editgrid").getGridParam("records");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; for(i=1;i&#60;=allRowsInGrid;i++)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; var rowId = $("#editgrid").getRowData(i);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var ingredientName = rowId[&#39;ingredientName&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(ingredientName == value)<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; flag = true;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(flag == true)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;return [false,"Ingredient Name: The Ingredient Name supplied is already in use. Please provide a different Ingredient Name."];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;return [true,""];<br />&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160; }},&#160;</p>
]]></description>
        	        	<pubDate>Mon, 25 Feb 2013 11:48:51 +0200</pubDate>
        </item>
</channel>
</rss>