<?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: JSON Data Type Problem</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/json-data-type-problem</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/json-data-type-problem/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on JSON Data Type Problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-data-type-problem#p3746</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-data-type-problem#p3746</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Maybe the easy way (which I should test) is</p>
<p>cell = cell +"";</p>
<p>before inserteding.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 29 Dec 2008 03:35:19 +0200</pubDate>
        </item>
        <item>
        	<title>River on JSON Data Type Problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-data-type-problem#p3708</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-data-type-problem#p3708</guid>
        	        	<description><![CDATA[<p>Thanks tony,</p>
<p>I&#39;m using ado.net Entity framework as the datasource</p>
<p>it will generate the json string while it return</p>
<p>&#160;<span style="color: #ff0000;">"total":false&#160; </span>is the result.&#160;</p>
<p>and "CREATEDTTM":"\\/Date(1229862650797)\\/" while the data type is DateTime.</p>
<p>Is there any possible to support this kind of data type??</p>
<p>Right now, I have a solution to solve the problem.</p>
<p>I made some modification to grid.base.js</p>
<p>in function addCell I add these code</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (cell != &#39;&#38;#160;&#39; &#38;&#38; p.colModel[pos].render) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; cell = p.colModel[pos].render(cell );<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>then I can have the display text I want in the colModel definition</p></p>
]]></description>
        	        	<pubDate>Wed, 24 Dec 2008 21:38:15 +0200</pubDate>
        </item>
        <item>
        	<title>tony on JSON Data Type Problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-data-type-problem#p3664</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-data-type-problem#p3664</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I will check this, but this causes the following when the data is added $(tabledataelem).html(false) - I&#39;m not sure if this is correct . If possible try to set "total" : "false".</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 23 Dec 2008 03:30:23 +0200</pubDate>
        </item>
        <item>
        	<title>River on JSON Data Type Problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-data-type-problem#p3637</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-data-type-problem#p3637</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I have a json string like this</p>
<p>{"d":{"total":2,"page":1,"records":10,"rows":[{"invid":1,"invdate":2,"amount":20,"tax":15,<span style="color: #ff0000;">"total":false</span>,"note":"this is a test"}]}}</p>
</p>
<p>and the grid setting is</p>
</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; var option = {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //mtype:"POST",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //url: "Default.aspx/GetData",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;local&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;invid&#39;, index: &#39;invid&#39;, width: 55, jsonmap: "invid" },<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;&#160; { name: &#39;invdate&#39;, index: &#39;invdate&#39;, width: 90, jsonmap: "invdate" },<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;&#160; { name: &#39;amount&#39;, index: &#39;amount&#39;, width: 80, align: &#39;right&#39;, jsonmap: "amount" },<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;&#160; { name: &#39;tax&#39;, index: &#39;tax&#39;, width: 80, align: &#39;right&#39;, jsonmap: "tax" },<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;&#160; { name: &#39;total&#39;, index: &#39;total&#39;, width: 80, jsonmap: "total" },<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;&#160; { name: &#39;note&#39;, index: &#39;note&#39;, width: 150, sortable: false, jsonmap: "note"}],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: jQuery(&#39;#pager&#39;),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum: 10,<br />&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160; sortname: &#39;id&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder: &#39;desc&#39;,<br />&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160; imgpath: &#39;themes/basic/images&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: &#39;My first grid&#39;,<br />&#160;&#160;&#160;&#160;&#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; repeatitems : false,<br />&#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;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; };</p>
<p>It cause an error in jQuery1.2.6.js line <a class="sourceLine" target="_blank"> 255</a></p>
<div class="sourceRow"><a class="sourceLine" target="_blank"> 252</a><span class="sourceRowText"> append: function() {</span></div>
<div class="sourceRow"><a class="sourceLine" target="_blank"> 253</a><span class="sourceRowText"> return this.domManip(arguments, true, false, function(elem){</span></div>
<div class="sourceRow"><a class="sourceLine" target="_blank"> 254</a><span class="sourceRowText"> if (this.nodeType == 1)</span></div>
<div class="sourceRow"><span style="color: #ff0000;"><a class="sourceLine" target="_blank"> 255</a><span class="sourceRowText"> this.appendChild( elem );</span></span></div>
<div class="sourceRow"><a class="sourceLine" target="_blank"> 256</a><span class="sourceRowText"> });</span></div>
<div class="sourceRow"><a class="sourceLine" target="_blank"> 257</a><span class="sourceRowText"> },</span></div>
<div class="sourceRow"></div>
<div class="sourceRow">and the value of elem is <span style="color: #ff0000;">false</span>.</div>
<div class="sourceRow"></div>
<div class="sourceRow">how can I solve the problem without change the JSON string ??</div>
<div class="sourceRow"></div>
<div class="sourceRow">Thanks</div>
<div class="sourceRow"></div>
<div class="sourceRow">River</div>
<div class="sourceRow"></div>
]]></description>
        	        	<pubDate>Sun, 21 Dec 2008 20:23:53 +0200</pubDate>
        </item>
</channel>
</rss>