<?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: Date Columns</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/date-columns</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/date-columns/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Date Columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/date-columns#p2326</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/date-columns#p2326</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>If I understand right your JSON data looks like this</p>
<p>&#8220;some_dt&#8221;: &#39;1223140084550&#39;</p>
<p>and you expect that the grid will format it in some date format.</p>
<p>Remember jqGrid is more server oriented and task like this should be done server side in most cases.</p>
<p>jqGrid does not have cellrendering features. (It uses already formated)</p>
<p>This is not trivial task</p>
<p>1. We need to known the source format and</p>
<p>2. We need to set our desired format.</p>
<p>Instead of this you can format data your own way - just use afterInsertRow event and setCell method - something like this</p>
<p>afterInsertRow: function(rowid, cellrow) {</p>
<p>jQuery("#mygrid").setCell(rowid,&#39;some_dt&#39;,myformater(cellrow.some_dt));</p>
<p>}</p>
<p>...</p>
<p>function myformater(src)</p>
<p>{</p>
<p>//perform here your formt</p>
<p>return new_formated_value</p>
<p>}</p>
<p>Also refer to example pages for ths</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sun, 05 Oct 2008 11:13:48 +0300</pubDate>
        </item>
        <item>
        	<title>las111 on Date Columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/date-columns#p2322</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/date-columns#p2322</guid>
        	        	<description><![CDATA[<p>Using the following jqGrid initialization</p>
<p>$("#searchDetailsGrid").jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: "Search Details Grid",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: "../Controllers/GridController.aspx?type=ajax&#38;operation=pop_Grid&#38;term=" <br />&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; + parameterContainer + "",&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataType: "json",&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [&#39;key&#39;, &#39;some_dt&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;key&#39;,index:&#39;key&#39;, width:60, sorttype:"int"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;some_dt&#39;,index:&#39;some_dt&#39;, width:60}<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jsonReader:{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; root: "Rows",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; page: "Page",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; total: "Total",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; records: "Records",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; repeatitems: false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; id: "0"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum: 10,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowList: [10,20,30],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder: "desc",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname:"key",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: $("#pagerDetails"),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; imgpath: "../../Scripts/jQuery/jqGrid/themes/basic/images/" <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }).navGrid("#pagerDetails",{edit:false,add:false,del:false});</p>
<p>Our current json serializer emits dates columns similar to "some_dt":new Date(1223140084550). It seems jqGrid can&#39;t process these columns. If I change the date to something like&#160; "some_dt":"2007-9-04" jqGrid runs fine. Am I missing some formatter declaration that would tell jqGrid how to process dates? I really need to keep the emitted dates as they are.</p>
</p>
<p>Thanks for your help</p></p>
]]></description>
        	        	<pubDate>Sun, 05 Oct 2008 08:34:22 +0300</pubDate>
        </item>
</channel>
</rss>