<?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: addRowData work incorrectly in grid</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/addrowdata-work-incorrectly-in-grid</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/bugs/addrowdata-work-incorrectly-in-grid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on addRowData work incorrectly in grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/addrowdata-work-incorrectly-in-grid#p28651</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/addrowdata-work-incorrectly-in-grid#p28651</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Humm &#8211; you are right, but I will not "fix" this, since it will break other code.</p>
<p>The problem here is that addRowData expect srcformat, which by default is "Y-m-d" and that is the reason for this "bug"</p>
<p>For the moment I think that one possible solution is that when adding a row from form edit and when reloadAfterSubmit is false not to change the date fields. Will see how to do this.</p>
<p>Thanks for this</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 15 Apr 2013 09:43:59 +0300</pubDate>
        </item>
        <item>
        	<title>Raducu on addRowData work incorrectly in grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/addrowdata-work-incorrectly-in-grid#p28638</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/addrowdata-work-incorrectly-in-grid#p28638</guid>
        	        	<description><![CDATA[<p>Code from&#160;myfirstgrid.html:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8982' value='Select Code' data-codeid='sfcode8982' /></p>
<div class='sfcode' id='sfcode8982'>
<p>&#160; $(&#34;#list&#34;).jqGrid({<br />&#160;&#160;&#160; url: &#39;findToXml.php&#39;,<br />&#160;&#160;&#160; datatype: &#39;xml&#39;,<br />&#160;&#160;&#160; mtype: &#39;GET&#39;,<br />&#160;&#160;&#160; colNames: [&#39;Inv No&#39;, &#39;Date&#39;, &#39;Amount&#39;, &#39;Tax&#39;, &#39;Total&#39;, &#39;Notes&#39;],<br />&#160;&#160;&#160; colModel: [<br />&#160;&#160;&#160;&#160;&#160; {name:&#39;invid&#39;, index:&#39;invid&#39;, width:55, align:&#39;right&#39;},<br />&#160;&#160;&#160;&#160;&#160; {name:&#39;invdate&#39;, index:&#39;invdate&#39;, width:90, align:&#39;center&#39;,<br />&#160;&#160;&#160;&#160;formatter:&#34;date&#34;, formatoptions: {newformat:&#34;d-m-Y&#34;}, editable:true,<br />&#160;&#160;&#160;&#160;editrules:{date:true}},<br />&#160;&#160;&#160;&#160;&#160; {name:&#39;amount&#39;, index:&#39;amount&#39;, width:80, align:&#39;right&#39;, formatter:&#39;number&#39;, editable:true,<br />&#160;&#160;&#160;&#160;editrules:{required:true, number:true, maxValue:&#34;9999.99&#34;, custom:true, custom_func:check1}},<br />&#160;&#160;&#160;&#160;&#160; {name:&#39;tax&#39;, index:&#39;tax&#39;, width:80, align:&#39;right&#39;, formatter:&#39;number&#39;, editable:true,<br />&#160;&#160;&#160;&#160;editrules:{required:true, number:true, maxValue:&#34;9999.99&#34;, custom:true, custom_func:check1}},<br />&#160;&#160;&#160;&#160;&#160; {name:&#39;total&#39;, index:&#39;total&#39;, width:80, align:&#39;right&#39;, formatter:&#39;number&#39;},<br />&#160;&#160;&#160;&#160;&#160; {name:&#39;note&#39;, index:&#39;note&#39;, width:150, sortable:false}<br />&#160;&#160;&#160; ],<br />&#160;&#160;&#160; height: 300,<br />//&#160;&#160;&#160; height: &#39;auto&#39;,<br />&#160;&#160;&#160; rowNum: 30,<br />//&#160;&#160;&#160; rowList:[10,20,30],<br />&#160;&#160;&#160; sortname: &#39;invid&#39;,<br />&#160;&#160;&#160; sortorder: &#39;desc&#39;,<br />&#160;&#160;&#160; gridview: true,<br />&#160;&#160;&#160; caption: &#39;My first grid&#39;,</p>
<p>&#160;&#160;&#160; pager: &#39;#pager&#39;,<br />//&#160;pgbuttons: false,<br />&#160;pginput: false,<br />&#160;&#160;&#160; viewrecords: false,<br />&#160;editurl: &#34;editgrid.php&#34;<br />&#160; }).navGrid(&#39;#pager&#39;, {}, //options<br />&#160;&#160;{reloadAfterSubmit:false, closeOnEscape:true, beforeSubmit:calcTotal, afterSubmit:response}, //prmEdit<br />&#160;&#160;{reloadAfterSubmit:false, closeOnEscape:true, beforeSubmit:calcTotal, afterSubmit:response,</p>
<p>&#160;&#160;&#160;&#160;afterComplete:function(response, postdata, formid){<br />&#160;&#160;&#160;&#160;&#160;$(this).jqGrid(&#39;setCell&#39;, postdata.invid, &#34;note&#34;, &#34;This is record &#34;+postdata.invid);<br />&#160;&#160;&#160;&#160;}</p>
<p>&#160;&#160;}, //prmAdd<br />&#160;&#160;{reloadAfterSubmit:false, closeOnEscape:true, beforeSubmit:calcTotal, afterSubmit:response}, //prmDel<br />&#160;&#160;{sopt:[&#39;eq&#39;,&#39;ne&#39;,&#39;lt&#39;,&#39;le&#39;,&#39;gt&#39;,&#39;ge&#39;,&#39;bw&#39;,&#39;bn&#39;,&#39;ew&#39;,&#39;en&#39;,&#39;cn&#39;,&#39;nc&#39;]}, //prmSearch<br />&#160;&#160;{} //prmView<br />&#160;);<br />});</p>
</div>
<p>When I click "Add new record"</p>
<p><a href="http://imageshack.us/a/img9/3692/beforehe.jpg"><img src="http://imageshack.us/a/img9/3692/beforehe.jpg" width="100"  style="border: 1px solid black; vertical-align: top;" class="spUserImage" alt="before" /><img src="http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_Mouse.png" class=" sfmouseother" alt="Image Enlarger" /></a></p>
</p>
<p>After Submit form "Add Record", date "19-10-2011&#8243; is translated&#160;to "02-04-2025&#8243; only in grid (data is transmitted to the server correctly: 19-10-2011).</p>
<p><a href="http://imageshack.us/a/img17/2748/after1rb.jpg"><img src="http://imageshack.us/a/img17/2748/after1rb.jpg" width="100"  style="border: 1px solid black; vertical-align: top;" class="spUserImage" alt="after" /><img src="http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_Mouse.png" class=" sfmouseother" alt="Image Enlarger" /></a></p>
</p>
<p>I find a solution !</p>
<p>I replaced line 3001 in jquery.jqGrid.src&#160;V 4.4.5 (function addRowData)</p>
<p><input type='button' class='sfcodeselect' name='sfselectit130' value='Select Code' data-codeid='sfcode130' /></p>
<div class='sfcode' id='sfcode130'>
<p>v = t.formatter( rowid, $.jgrid.getAccessor(data,nm), i, data );</p>
</div>
<p>with</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2755' value='Select Code' data-codeid='sfcode2755' /></p>
<div class='sfcode' id='sfcode2755'>
<p>v = t.formatter( rowid, $.jgrid.getAccessor(data,nm), i, data, &#34;edit&#34; );</p>
</div>
<p>because $.fn.fmatter.date (called from formatter) work incorrectly (in this case) with act=="undefined".</p>
</p>
<p><strong>That is the question ? Is it good or bad ?</strong></p>
]]></description>
        	        	<pubDate>Fri, 12 Apr 2013 01:01:51 +0300</pubDate>
        </item>
</channel>
</rss>