<?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: set an empty string as a date using setRowData</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/set-an-empty-string-as-a-date-using-setrowdata</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/set-an-empty-string-as-a-date-using-setrowdata/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on set an empty string as a date using setRowData</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/set-an-empty-string-as-a-date-using-setrowdata#p17952</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/set-an-empty-string-as-a-date-using-setrowdata#p17952</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>The common mistake. Also setRowData, getRowData and etc does not have effect in edit mode - there are a tons of post here</p>
<p>The code should be</p>
<p>afterSubmitCell: function(response,<strong> id</strong>, name, val, iRow, iCol) { &#8230;.</p>
<p>if (!validateDate(enddate, startdate)) { //if (Date.parse(startdate) &#62; Date.parse(enddate)) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong>$("#"+id+"_startdate","#list2&#8243;).val("");</strong><br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return [false, &#39;startdate &#62; enddate&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } else {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return [true, &#39;&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />}</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 16 Jun 2010 13:20:45 +0300</pubDate>
        </item>
        <item>
        	<title>joah1 on set an empty string as a date using setRowData</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/set-an-empty-string-as-a-date-using-setrowdata#p17924</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/set-an-empty-string-as-a-date-using-setrowdata#p17924</guid>
        	        	<description><![CDATA[<p>colNames: [...]<br />&#160;&#160;&#160; colModel: [<br />&#160;&#160;&#160;&#160;&#160; {name: &#39;startdate&#39;, index: &#39;startdate&#39;,width:210,sorttype:"date", sortable: true, editable:true, date: true, formatter: "date" },<br />&#160;&#160;&#160;&#160;&#160; {name: &#39;enddate&#39;, index: &#39;enddate&#39;,width:210,sorttype:"date", sortable: true,editable:true, date: true, formatter: "date" },<br />&#160;&#160;&#160; ]</p>
</p>
<p>afterSubmitCell: function(response, id, name, val, iRow, iCol) { ....</p>
<p>if (!validateDate(enddate, startdate)) { //if (Date.parse(startdate) &#62; Date.parse(enddate)) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#list2&#8243;).setRowData(id, {startdate: &#39;&#39; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return [false, &#39;startdate &#62; enddate&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } else {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return [true, &#39;&#39;];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />}</p>
</p>
<p>We are using the german grid.locale-de.js and we have written a javascript validation method to validate dates where the startdate is bigger than the enddate, in that case, we want to display an error message and clear the rowData startdate.</p>
</p>
<p>Using $("#list2&#8243;).setRowData(id, {enddate: &#39;&#39; }); via Firebug it works fine, but the code above does not clear the column and inserts wired dates in the column.</p>
<p>Did anybody have same problem and any ideas? I could imagine the problem could be the datefmt?</p>
</p>
<p>Thanks for your help.</p>
</p>
<p>kind Regards,</p>
<p>joah1</p>
]]></description>
        	        	<pubDate>Tue, 15 Jun 2010 12:34:59 +0300</pubDate>
        </item>
</channel>
</rss>