<?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: Can't Add\Edit on Modal Window</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/cant-addedit-on-modal-window</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/cant-addedit-on-modal-window/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Can't Add\Edit on Modal Window</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cant-addedit-on-modal-window#p7700</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cant-addedit-on-modal-window#p7700</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Publishing the code in your case is recommended.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 08 Jul 2009 05:47:13 +0300</pubDate>
        </item>
        <item>
        	<title>the_cubanate on Can't Add\Edit on Modal Window</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cant-addedit-on-modal-window#p7657</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cant-addedit-on-modal-window#p7657</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I&#39;m using jqGrid 3.5, ASP.NET MVC 1.0 and&#160;jQuery UI 1.7.2</p>
<p>The problem I&#39;m having is that this function is failing after adding or editting items:</p>
</p>
<p><span style="font-size: x-small;"><font size="2"></font></span></p>
<p>formatter=</p>
</p>
<p><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">function</span></span><span style="font-size: x-small;">(rowId,cellval,colpos,rwdat,_act){</span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">var</span></span><span style="font-size: x-small;"> cm=ts.p.colModel[colpos],v;</span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">if</span></span><span style="font-size: x-small;">(</span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">typeof</span></span><span style="font-size: x-small;"> cm.formatter!==</span><span style="color: #a31515; font-size: x-small;"><span style="color: #a31515; font-size: x-small;">"undefined"</span></span><span style="font-size: x-small;">){</span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">var</span></span><span style="font-size: x-small;"> opts={rowId:rowId,colModel:cm};</span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">if</span></span><span style="font-size: x-small;">($.isFunction(cm.formatter)){v=cm.formatter(cellval,opts,rwdat,_act)}</span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">else</span></span><span style="font-size: x-small;">{</span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">if</span></span><span style="font-size: x-small;">($.fmatter){v=$.fn.fmatter(cm.formatter,cellval,opts,rwdat,_act)}</span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">else</span></span><span style="font-size: x-small;">{v=cellVal(cellval)}}}</span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">else</span></span><span style="font-size: x-small;">{v=cellVal(cellval)}</span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">return</span></span></p>
<p><span style="font-size: x-small;">v},</span></p>
</p>
<p>On firebug and visual studio&#39;s debugger I can see that colpos = 4 which for my colModel is wrong because there&#39;s only 4 fields in it (colpos should be at most 3).</p>
</p>
<p>A strange thing is that if I add, get the error, and then refresh the page the grid displays all changes correctly.</p>
<p>I can provide the code I&#39;m using and some sample json data.</p>
<p>Thanks in advance</p>
]]></description>
        	        	<pubDate>Sun, 05 Jul 2009 20:39:24 +0300</pubDate>
        </item>
</channel>
</rss>