<?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: inline editing and enforcing editrules</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/inline-editing-and-enforcing-editrules</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/inline-editing-and-enforcing-editrules/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>D_W on inline editing and enforcing editrules</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/inline-editing-and-enforcing-editrules#p15263</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/inline-editing-and-enforcing-editrules#p15263</guid>
        	        	<description><![CDATA[<p>If I make a column editable, and use edit rules to require it to be a number</p>
<p>{ name: &#39;Value&#39;, index: &#39;Value&#39;, width: 50, sortable: true,edittype: &#39;text&#39;,</p>
<p>&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;editable: true, editoptions: { maxlength: 10 },</p>
<p>&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;editrules:{number: true},</p>
<p>&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;formatter:currencyFmatter, unformat:unformatCurrency },</p>
</p>
<p>and I control editing and saving in the onSelectRow event:</p>
<p>onSelectRow: function(id){</p>
<p>if(id &#38;&#38; id!==lastSel){</p>
<p>jQuery("#Groups").saveRow(lastSel,true,&#39;clientArray&#39;);&#160;&#160;&#160;&#160;&#160; jQuery("#Groups").editRow(id,true);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }&#160;</p>
<p>lastSel=id</p>
<p>},</p>
<p>I then use a button click event to save the grid. Everything works great untill I put a non-numeric value into the Value cell then click on the row below it.&#160; It throw as warning box up and stop the save, but it does not stop me from changing rows.&#160; So I now have two rows open for editing.&#160; Is there a way to trap the editrule error so I can handle it before moving to the next row.&#160;</p>
<pre>I have tried to use the functions with saveRow (succesfunc, aftersavefunc, errorfunc, afterrestorefunc), of which all say fire after data is saved to server, which does not appear to work for &#8216;clientArray&#8217;.</pre>
<pre>&#160;</pre>
<pre>Basically, I need to find a way to validate the data in inline editing when saved to &#8216;clientArray&#8217;&#160; and information, suggestions, and particularly, examples would be greatly appreciated.</pre>
<pre>&#160;</pre>
<pre>Thanks.</pre>
]]></description>
        	        	<pubDate>Mon, 01 Mar 2010 20:33:29 +0200</pubDate>
        </item>
</channel>
</rss>