<?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: REST support</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/rest-support</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/feature-request/rest-support/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on REST support</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/rest-support#p21769</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/rest-support#p21769</guid>
        	        	<description><![CDATA[<p>You can use <strong>mtype</strong> option:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9482' value='Select Code' data-codeid='sfcode9482' /></p>
<div class='sfcode' id='sfcode9482'>$(&#34;#list&#34;).jqGrid(&#39;navGrid&#39;,&#39;#pager&#39;, {},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { mtype: &#34;PUT&#34; },&#160;&#160; // Edit options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { mtype: &#34;POST&#34; }, // Add options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { mtype: &#34;DELETE&#34; }); // Del option</div>
<p>To set delete option you can use also&#160; jQuery.extend(jQuery.jgrid.del, {mtype: "DELETE"});</p>
<p>Best regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Thu, 20 Jan 2011 20:09:53 +0200</pubDate>
        </item>
        <item>
        	<title>ludoo on REST support</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/rest-support#p21764</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/rest-support#p21764</guid>
        	        	<description><![CDATA[<p>Thanks for really useful informations ans links !</p>
</p>
<p>But i don&#39;t find where the methods PUT, POST, DELETE, GET are set depending on CRUD operation.</p>
<p>And i encountered a JSON conversion mapping since JSON should be strong typed and grid always returns String ("true" instead true...)</p>
</p>
<p>Regards</p>
<p>LudoO</p>
]]></description>
        	        	<pubDate>Thu, 20 Jan 2011 18:20:21 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on REST support</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/rest-support#p21762</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/rest-support#p21762</guid>
        	        	<description><![CDATA[<p>Hello LudoO,</p>
<p>RESTful services on the server side are supported since a long time by jqGrid. To load data from the REST you can use</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7221' value='Select Code' data-codeid='sfcode7221' /></p>
<div class='sfcode' id='sfcode7221'>ajaxGridOptions: { contentType: &#39;application/json; charset=utf-8&#39; },<br />&#160;&#160; &#160;serializeGridData: function (postData) {<br />&#160;&#160; &#160;return JSON.stringify(postData);<br /> }</div>
<p>where <strong>JSON.stringify</strong> function (the corresponding JavaScript can be downloaded from <a href="http://www.json.org/js.html)" rel="nofollow" target="_blank"></a><a href="http://www.json.org/js.html" rel="nofollow" target="_blank">http://www.json.org/js.html</a>).</p>
<p>To use almost the same setting for formedit:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit540' value='Select Code' data-codeid='sfcode540' /></p>
<div class='sfcode' id='sfcode540'>ajaxEditOptions: { contentType: &#34;application/json; charset=utf-8&#34; },<br />serializeEditData: function (postdata) {<br />&#160;&#160; &#160;return JSON.stringify(postData);<br />}</div>
<p>You can set the settings per <strong>jQuery.extend(jQuery.jgrid.edit, {...});</strong> and&#160;<strong>jQuery.extend(jQuery.jgrid.del, {...});</strong>.</p>
<p>To use URL in RESTfull style for Add/Edit</p>
<p><input type='button' class='sfcodeselect' name='sfselectit935' value='Select Code' data-codeid='sfcode935' /></p>
<div class='sfcode' id='sfcode935'>onclickSubmit: function(rp_ge, postdata) { rp_ge.url = urlEdit + &#39;/&#39; + postdata.list_id; }</div>
<p>and for Delete</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3819' value='Select Code' data-codeid='sfcode3819' /></p>
<div class='sfcode' id='sfcode3819'>serializeDelData: function (postdata) {<br />&#160;&#160; &#160;return &#34;&#34;; // the body MUST be empty in DELETE HTTP requests<br />}</div>
<p>Here are some links with the code examples: <a href="http://stackoverflow.com/questions/2833254/jqgrid-delete-row-how-to-send-additional-post-data/2834061#2834061" target="_blank">this</a>, <a href="http://stackoverflow.com/questions/4557908/how-to-jsonify-add-post-parameters-for-jqgrid/4558731#4558731" target="_blank">this</a>, <a href="http://stackoverflow.com/questions/2675625/setting-the-content-type-of-requests-performed-by-jquery-jqgrid/2678731#2678731" target="_blank">this</a>, <a href="http://stackoverflow.com/questions/3912008/jqgrid-does-not-populate-with-data/3914796#3914796" target="_blank">this</a>, <a href="http://stackoverflow.com/questions/3408922/jqgrid-datatype-function-and-access-to-sord-sidx-etc/3410806#3410806" target="_blank">this</a>.</p>
<p>Best regards<br />Oleg&#160;</p></p>
]]></description>
        	        	<pubDate>Thu, 20 Jan 2011 14:10:06 +0200</pubDate>
        </item>
        <item>
        	<title>ludoo on REST support</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/rest-support#p21758</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/rest-support#p21758</guid>
        	        	<description><![CDATA[<p>Please add a native way to support REST methods in formedit.</p>
<p>This will be a great addition !</p>
</p>
<p>I&#39;ve got a working solution as a personal patch for 3.8.2, but a native solution will be great !</p>
</p>
<p>Thansk</p>
</p>
<p>LudoO</p>
]]></description>
        	        	<pubDate>Thu, 20 Jan 2011 10:52:54 +0200</pubDate>
        </item>
</channel>
</rss>