<?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: One cell Formatter not executing after updating another cell?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/one-cell-formatter-not-executing-after-updating-another-cell</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/one-cell-formatter-not-executing-after-updating-another-cell/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>jm44122 on One cell Formatter not executing after updating another cell?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/one-cell-formatter-not-executing-after-updating-another-cell#p26274</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/one-cell-formatter-not-executing-after-updating-another-cell#p26274</guid>
        	        	<description><![CDATA[<p>I have formatters on visible cells that combine values on two or more hidden cells. I do editing in another area of the web page and pass the values to the grid&#39;s hidden cells using the setCell function. The formatters are not updating &#160;the visible cells, although I thought that they were once doing so. I am not detecting any web page errors.</p>
<p>The formatters work when data is initially loaded. Since my editing also writes values into the database, re-running the web page will show my changes in the formatted cell. I don&#39;t want to reload the entire grid upon each data save, which is why I am attempting to change the grid cells as I save to the database.</p>
<p>This is my formatter function. I would like it to execute if I change the grid cells that contain values such as sAlertType, sNotifyTrigger, IUnits, etc. I&#39;ve tried pasting as text and word, but both do not show well in this post. Text loses indents. Word loses linewraps.</p>
<p>function triggerFormatter(cellvalue, options, rowObject) {</p>
<p>var value = &#39;&#39;;</p>
<p>var date;</p>
</p>
<p>switch (rowObject.sAlertType) {</p>
<p>case &#39;N&#39;:</p>
<p>value += &#39;Change in &#39;;</p>
<p>value += rowObject.sNotifyTrigger;</p>
<p>break;</p>
<p>case &#39;SR&#39;:</p>
<p>case &#39;PR&#39;:</p>
<p>case &#39;R&#39;:</p>
<p>value += rowObject.IUnits;</p>
<p>value += &#39; &#39;;</p>
<p>value += rowObject.sUnitOfMeasure;</p>
<p>value += &#39;(s) &#39;;</p>
<p>if (rowObject.sTimeRelation == &#39;-&#39;)</p>
<p>value += &#39;prior to &#39;;</p>
<p>else</p>
<p>value += &#39;after &#39;;</p>
<p>if ((typeof (rowObject.sNotifyTrigger) != &#39;undefined&#39;) &#38;&#38; rowObject.sNotifyTrigger != null) {</p>
<p>value += rowObject.sNotifyTrigger;</p>
<p>}</p>
<p>value += &#39; (&#39;;</p>
<p>try {</p>
<p>if (eval(&#39;rowObject.&#39; + rowObject.sNotifyType)) {</p>
<p>date = new Date(parseInt(eval(&#39;rowObject.&#39; + rowObject.sNotifyType + &#39;.substr(6)&#39;)));</p>
<p>value += $.datepicker.formatDate(&#39;mm/dd/yy&#39;, date);</p>
<p>}</p>
<p>else</p>
<p>value += &#39;[blank]&#39;;</p>
<p>}</p>
<p>catch (e) {</p>
<p>if (typeof (rowObject.sNotifyType) != &#39;undefined&#39;) {</p>
<p>if (rowObject.sNotifyType != &#39;&#39;)</p>
<p>value += &#39;[&#39; + rowObject.sNotifyType + &#39;]&#39;;</p>
<p>}</p>
<p>}</p>
<p>value += &#39;)&#39;;</p>
<p>break;</p>
<p>case &#39;W&#39;:</p>
<p>value += &#39;Watch folder &#39;;</p>
<p>if (rowObject.sInherit == &#39;Subs&#39;)</p>
<p>value += &#39;(including subs) &#39;;</p>
<p>break</p>
<p>default:</p>
<p>value += &#39;N/A&#39;;</p>
<p>break;</p>
<p>}</p>
<p>return value;</p>
<p>}</p>
]]></description>
        	        	<pubDate>Mon, 02 Apr 2012 15:57:38 +0300</pubDate>
        </item>
</channel>
</rss>