<?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 Post Format?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/json-post-format</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-post-format/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>partoo on JSON Post Format?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-post-format#p15186</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-post-format#p15186</guid>
        	        	<description><![CDATA[<p>Hi Sloan!</p>
<p>Can you give me your solution?</p>
]]></description>
        	        	<pubDate>Fri, 26 Feb 2010 19:11:38 +0200</pubDate>
        </item>
        <item>
        	<title>Sloan Thrasher on JSON Post Format?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8590</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8590</guid>
        	        	<description><![CDATA[<p>Hi Matthew!</p>
</p>
<p>Never mind -- I think I found it! You example was very helpful and got me going in the right direction.</p>
</p>
<p>Sloan</p>
]]></description>
        	        	<pubDate>Fri, 14 Aug 2009 11:07:12 +0300</pubDate>
        </item>
        <item>
        	<title>Sloan Thrasher on JSON Post Format?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8588</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8588</guid>
        	        	<description><![CDATA[<blockquote>
<p>Matthew said:</p>
<p>Mmm my post tells you one of the available formats&#8230;</p>
</p>
<p>btw who is Jason O_o</p>
</blockquote>
<hr />
<p>Sorry &#39;bout that Matthew!, must have been cranial flatulance on my part.</p>
</p>
<p>I must be confused. In reading your post above, it appeared to be just the format to send to the server. I&#39;m an ASP (classic) programmer, so the PHP examples haven&#39;t helped. I guess I&#39;m wondering how the submit to the ASP program will look. For instance, what is the name of the submitted info in the request object? How do the rows appear when saving data from the grid?</p>
<p>My guess from your example is that I&#39;ll get a form value for each of the parameters (i.e. page, pagesize, sortiindex, and sortdirection) If I specify each column in a row, will I receive a form value for "row", and then the fields in the row?</p>
</p>
<p>Thanks for your patience!</p>
</p>
<p>Sloan</p>
]]></description>
        	        	<pubDate>Fri, 14 Aug 2009 10:49:46 +0300</pubDate>
        </item>
        <item>
        	<title>Matthew on JSON Post Format?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8561</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8561</guid>
        	        	<description><![CDATA[<p>Mmm my post tells you one of the available formats...</p>
</p>
<p>btw who is Jason O_o</p>
]]></description>
        	        	<pubDate>Thu, 13 Aug 2009 14:50:26 +0300</pubDate>
        </item>
        <item>
        	<title>Sloan Thrasher on JSON Post Format?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8558</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8558</guid>
        	        	<description><![CDATA[<blockquote>
<p>Matthew said:</p>
<p>If you&#39;re going to be posting JSON you&#39;re probably better of using a custom data function like this..</p>
</p>
<p>setup your grid with the datatype option set as</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7529' value='Select Code' data-codeid='sfcode7529' /></p>
<div class='sfcode' id='sfcode7529'>datatype : function(pdata) { getData(pdata); }</div>
</p>
<p>and here is the function&#8230;. note the params object which is what i send JSONified to my webservice&#8230; which can be anything you want&#8230; and in my case the data that gets sent is&#8230;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5387' value='Select Code' data-codeid='sfcode5387' /></p>
<div class='sfcode' id='sfcode5387'>{&#8221;page&#8221;:1,&#8221;pageSize&#8221;:25,&#8221;sortIndex&#8221;:&#8221;id&#8221;,&#8221;sortDirection&#8221;:&#8221;desc&#8221;}</div>
</p>
<p>see how they match my &#8220;params&#8221; object &#8230;</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4020' value='Select Code' data-codeid='sfcode4020' /></p>
<div class='sfcode' id='sfcode4020'>&#160;&#160;&#160; function getData(pdata) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var params = new Object();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; params.page = pdata.page;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; params.pageSize = pdata.rows;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; params.sortIndex = pdata.sidx;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; params.sortDirection = pdata.sord;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $.ajax({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; type: &#8220;POST&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; contentType: &#8220;application/json; charset=utf-8&#8243;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: &#8220;YourWebservice.asmx/GetGridData&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; data: JSON.stringify(params),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataType: &#8220;json&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; success: function(data, textStatus) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (textStatus == &#8220;success&#8221;) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var thegrid = $(&#8221;#YourGrid&#8221;)[0];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; thegrid.addJSONData(data.d);<br />&#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; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; error: function(data, textStatus) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; alert(&#39;An error has occured retrieving data!&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160; }</p>
</div>
</blockquote>
<hr />
<p>Hi Jason,</p>
</p>
<p>I&#39;ve got the format for sending the data to the grid. I&#39;m wanting to know what format the data is sent to the server.</p>
</p>
<p>TIA!</p>
</p>
<p>Sloan</p>
]]></description>
        	        	<pubDate>Thu, 13 Aug 2009 12:08:42 +0300</pubDate>
        </item>
        <item>
        	<title>Matthew on JSON Post Format?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8554</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8554</guid>
        	        	<description><![CDATA[<p>If you&#39;re going to be posting JSON you&#39;re probably better of using a custom data function like this..</p>
</p>
<p>setup your grid with the datatype option set as</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3927' value='Select Code' data-codeid='sfcode3927' /></p>
<div class='sfcode' id='sfcode3927'>datatype : function(pdata) { getData(pdata); }</div>
</p>
<p>and here is the function.... note the params object which is what i send JSONified to my webservice... which can be anything you want... and in my case the data that gets sent is...</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3976' value='Select Code' data-codeid='sfcode3976' /></p>
<div class='sfcode' id='sfcode3976'>{"page":1,"pageSize":25,"sortIndex":"id","sortDirection":"desc"}</div>
</p>
<p>see how they match my "params" object ...</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8093' value='Select Code' data-codeid='sfcode8093' /></p>
<div class='sfcode' id='sfcode8093'>&#160;&#160;&#160; function getData(pdata) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var params = new Object();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; params.page = pdata.page;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; params.pageSize = pdata.rows;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; params.sortIndex = pdata.sidx;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; params.sortDirection = pdata.sord;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $.ajax({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; type: "POST",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; contentType: "application/json; charset=utf-8",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: "YourWebservice.asmx/GetGridData",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; data: JSON.stringify(params),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; dataType: "json",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; success: function(data, textStatus) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (textStatus == "success") {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var thegrid = $("#YourGrid")[0];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; thegrid.addJSONData(data.d);<br />&#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; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; error: function(data, textStatus) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; alert(&#39;An error has occured retrieving data!&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160; }</p>
</div>
]]></description>
        	        	<pubDate>Thu, 13 Aug 2009 10:53:03 +0300</pubDate>
        </item>
        <item>
        	<title>Sloan Thrasher on JSON Post Format?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8552</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/json-post-format#p8552</guid>
        	        	<description><![CDATA[<p>Hi all,</p>
</p>
<p>How do I find out the format of the requests sent to the server?</p>
<p>I&#39;ve searched the forums, and the documentation, but haven&#39;t been able to find the info.</p>
<p>Any help would be greatly appreciated!</p>
</p>
<p>TIA</p>
</p>
<p>Sloan</p>
]]></description>
        	        	<pubDate>Thu, 13 Aug 2009 10:40:45 +0300</pubDate>
        </item>
</channel>
</rss>