<?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: Using function, in place of editurl?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl</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/using-function-in-place-of-editurl/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>jdege on Using function, in place of editurl?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21207</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21207</guid>
        	        	<description><![CDATA[<p>Sorry to keep coming back to this.&#160; I&#39;ve tried your suggestions, and have made some good progress.</p>
</p>
<p>While digging through the code, I noticed a useDataProxy in grid.formedit.js.</p>
</p>
<p>Does this work?&#160; Or is it simply a remnent of an earlier idea that never panned out.</p>
]]></description>
        	        	<pubDate>Tue, 07 Dec 2010 19:02:49 +0200</pubDate>
        </item>
        <item>
        	<title>jdege on Using function, in place of editurl?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21179</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21179</guid>
        	        	<description><![CDATA[<p>Fair enough, thanks.</p>
]]></description>
        	        	<pubDate>Mon, 06 Dec 2010 20:40:00 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Using function, in place of editurl?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21177</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21177</guid>
        	        	<description><![CDATA[<p>editurl as a function is not supported. You should use <a href="/jqgridwiki/doku.php?id=wiki:inline_editing#saverow" target="_blank">&#39;clientArray&#39;</a> in case of inline editing. Form editing had not full support of local editing. Probably now?</p>
]]></description>
        	        	<pubDate>Mon, 06 Dec 2010 18:54:14 +0200</pubDate>
        </item>
        <item>
        	<title>jdege on Using function, in place of editurl?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21176</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21176</guid>
        	        	<description><![CDATA[<p>I know how to implement a .asmx web service.&#160; I&#39;ve done it quite a number of times. But whether a webmethod is implemented as a page method, or as a part of a .asmx web service is irrelevant to the question I&#39;m asking.</p>
</p>
<p>How do I process add/edit/delete, using local javascript functions?</p>
]]></description>
        	        	<pubDate>Mon, 06 Dec 2010 18:28:05 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Using function, in place of editurl?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21175</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21175</guid>
        	        	<description><![CDATA[<p>Sorry jdege,</p>
<p>but I don&#39;t agree with your statements about the complexity. If you rename one file so that it has just <strong>correct</strong> extension ASMX, you code</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1461' value='Select Code' data-codeid='sfcode1461' /></p>
<div class='sfcode' id='sfcode1461'>[WebMethod()]<br /> [ScriptMethod(ResponseFormat = ResponseFormat.Json)]<br /> public static MyData getMyData(Dictionary&#60;string, object&#62; postData)<br /> {<br />&#160;&#160;&#160; MyData myData = new MyData();<br />&#160;&#160;&#160; &#8230;<br />&#160;&#160;&#160; return myData;<br /> }</div>
</p>
<p>will work correctly. You should only fix parameter Dictionary&#60;string, object&#62; postData to parameters which are described in the links which I posted before (like int page, int rows, ...).</p>
<p>Your current implementation can follow that the results of getMyData method will be placed as a part of HTML page or some part of master pages will be added. Moreover view state with whole table contain could be send to or from the server. So you will have many additional problems and the "complexity" of the solution is now higher as with pure web service.</p>
<p>What you need to do is just choose in the "Solution Explorer" of your Visual Studio Project in contex menu the item "Add", then "New Item". Then choose you should choose "Web Service" template instead of "Web Form" and modify a little the code which will be automatically produced. It can sound complex only if you do this at the first time, but it is really very simple.</p>
<p>Best regards<br />Oleg</p></p>
]]></description>
        	        	<pubDate>Mon, 06 Dec 2010 18:11:25 +0200</pubDate>
        </item>
        <item>
        	<title>jdege on Using function, in place of editurl?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21173</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21173</guid>
        	        	<description><![CDATA[<p>Going with a separate webservice, whether WCF or ASMX, may provide better performance, but it increases code complexity.&#160; In some situations, performance is the dominant concern, and the additional complexity is acceptable.&#160; In others, it is not.</p>
</p>
<p>In my case, we&#39;re talking about a low-volume website, with a great many pages containg jqGrids, each of which will be used rarely, and will pull down only modest amounts of data.&#160; Building separate webservices to feed each, rather than using page methods, is not the optimal solution.</p>
</p>
<p>At first glance, none of the examples you provided addressed my specific question.&#160; For example, you&#39;ve provided links to answer "the MVC questions", when I specifically stated that we weren&#39;t using MVC.</p>
</p>
<p>I&#39;ll look into them more deeply, though, to see if there is anything that applies.&#160; But in the meantime, I&#39;ll ask again:</p>
</p>
<p>Is there a way to process add/edit/delete in jqGrid, using local javascript functions?</p></p>
]]></description>
        	        	<pubDate>Mon, 06 Dec 2010 17:27:04 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Using function, in place of editurl?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21135</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21135</guid>
        	        	<description><![CDATA[<p>From the performance side the best choice will be to has a WCF service published in the same web side. You can find the example <a href="http://stackoverflow.com/questions/3912008/jqgrid-does-not-populate-with-data/3914796#3914796" target="_blank">here</a>. The second choice will be an ASMX web service (see <a href="http://stackoverflow.com/questions/2835957/jquery-with-asp-net-mvc-calling-ajax-enabled-web-service/2836817#2836817" target="_blank">here</a>). All this solutions you can easy integrate as a part of the ASP.NET Web Form site. It will work for pure HTML pages also. To edit jqGrid data see <a href="http://stackoverflow.com/questions/3917102/jqgrid-add-row-and-send-data-to-webservice-for-insert/3918615#3918615" target="_blank">this</a>. <a href="http://stackoverflow.com/questions/4169384/how-can-i-bind-my-view-model-to-a-jqgrid/4169848#4169848" target="_blank">This one</a>&#160;and <a href="http://stackoverflow.com/questions/4078592/sortable-jqgrid-using-linq-to-mysql-dblinq-and-dynamic-linq-orderby-doesnt-w/4079121#4079121" target="_blank">this</a>&#160;are the answers on the MVC questions, but almost all can be used also for WCF/ASMX&#160;can be probably also interesting.</p>
<p>The main advantage of the WCF/ASMX way corresponds to you current way is native support of all jqGrid features including paging, sorting and filtering (searching) of data.</p>
<p>Best regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Sat, 04 Dec 2010 03:56:05 +0200</pubDate>
        </item>
        <item>
        	<title>jdege on Using function, in place of editurl?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21133</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21133</guid>
        	        	<description><![CDATA[<p>The server-side is a page webmethod on an asp.net web form.&#160; That is, we have a method like this defined in a .aspx.cs page:</p>
</p>
<p style="padding-left: 30px;">[WebMethod()]</p>
<p style="padding-left: 30px;">[ScriptMethod(ResponseFormat = ResponseFormat.Json)]</p>
<p style="padding-left: 30px;">public static MyData getMyData(Dictionary&#60;string, object&#62; postData)</p>
<p style="padding-left: 30px;">{</p>
<p style="padding-left: 60px;">MyData myData = new MyData();</p>
<p style="padding-left: 60px;">&#8230;</p>
<p style="padding-left: 60px;">return myData;</p>
<p style="padding-left: 30px;">}</p>
<p style="padding-left: 30px;">&#160;</p>
<p>Note, this is ASP.NET web forms, not ASP.NET MVC.</p>
<p>And it&#39;s a WebMethod defined within a .aspx page, not in a .asmx web service.&#160;</p>
</p>
<p>It&#39;s called from javascript with:</p>
</p>
<p style="padding-left: 30px;">PageMethods.getMyData(postdata, successCallback, errorCallback);</p>
</p>
<p>I&#39;ve not found examples on how to make a simple data load work, calling a page webmethod.&#160; So I&#39;m using a function datatype.</p>
</p>
<p>If  there&#39;s a way to make data load work, calling a page webmethod  directly, I&#39;d love to learn about it.&#160; And if I can make add, edit, and  delete work, using page webmethods, I&#39;d like to know how to do that,  too.</p>
</p>
<p>But even if all of that can be  done, I still want to know how to use a local javascript function for  handling add, edit, and delete.</p></p>
]]></description>
        	        	<pubDate>Sat, 04 Dec 2010 02:11:26 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Using function, in place of editurl?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21132</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21132</guid>
        	        	<description><![CDATA[<p>I don&#39;t recommend you to use datatype as function if it is not really required. In very old version of jqGrid (more as one year old) was less support for different options of ajax requests. Since at least more then one year you can use new options (see <a href="http://stackoverflow.com/questions/2675625/setting-the-content-type-of-requests-performed-by-jquery-jqgrid/2678731#2678731" target="_blank">here</a>&#160;and <a href="http://stackoverflow.com/questions/2833254/jqgrid-delete-row-how-to-send-additional-post-data/2834061#2834061" target="_blank">here</a> for example) so you can get data, edit data accessing practically any data source. To write more advices for you I have to know the technology which you use on the server side.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Sat, 04 Dec 2010 01:45:45 +0200</pubDate>
        </item>
        <item>
        	<title>jdege on Using function, in place of editurl?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21131</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/using-function-in-place-of-editurl#p21131</guid>
        	        	<description><![CDATA[<p>JqGrid allows me to use a javascript function, instead of a URL, for datatype.&#160; This has allowed me to get data from an odd source, and to manipulate it into json that I can populate the jqGrid with, using addJSONData().</p>
</p>
<p>My problem now is with editing.&#160; If I set editurl to a javascript function, I get an error:</p>
<p style="padding-left: 30px;">Error Row: 4 Result: 405:Method Not Allowed Status: error</p>
</p>
<p>What do I need to do to have edit pass its data to a javascript function, instead of to a URL?</p>
]]></description>
        	        	<pubDate>Sat, 04 Dec 2010 01:05:52 +0200</pubDate>
        </item>
</channel>
</rss>