<?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: loadBeforeSend</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/loadbeforesend</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/bugs/loadbeforesend/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on loadBeforeSend</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/loadbeforesend#p1735</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/loadbeforesend#p1735</guid>
        	        	<description><![CDATA[<p>This have sense - We have loadComplete, but we do not have event which ia arised before the request. I will consider this and maybe add such event.</p>
<p>Thanks</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 27 Aug 2008 02:28:52 +0300</pubDate>
        </item>
        <item>
        	<title>smlong426 on loadBeforeSend</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/loadbeforesend#p1727</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/loadbeforesend#p1727</guid>
        	        	<description><![CDATA[<p>Ah - Thanks Tony.&#160; I thought I must have misunderstood the documentation.</p>
</p>
<p>Is there any place where the data can be modified prior to the server request?</p>
</p>
<p>Right now, the only thing I have found is to do something like make a js function for instantiating the jqgrid and accepts a single parameter representing the initial postData.&#160; I can also achieve the same result with an initial hidden grid.</p>
</p>
<p>Anyhow, just curious.&#160; I really like your plugin, Tony.&#160; My experience prior to now has been using server controls for all grids.&#160; But I think the user experience with your jqgrid seems much closer to a desktop application.</p>
]]></description>
        	        	<pubDate>Tue, 26 Aug 2008 07:59:57 +0300</pubDate>
        </item>
        <item>
        	<title>tony on loadBeforeSend</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/loadbeforesend#p1720</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/loadbeforesend#p1720</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>You can not do this in this event. jqGrid uses a standart ajax beforeSend</p>
<p>event. As of jQuery docs with this event you can only modifi the header of the request, but not the data. Here is the help.</p>
<p>beforeSend</p>
<p>"A pre-callback to modify the XMLHttpRequest object before it is sent. Use this to set custom headers etc. The XMLHttpRequest is passed as the only argument. This is an Ajax Event. You may return true in function to cancel the request."</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 26 Aug 2008 03:08:29 +0300</pubDate>
        </item>
        <item>
        	<title>smlong426 on loadBeforeSend</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/loadbeforesend#p1716</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/loadbeforesend#p1716</guid>
        	        	<description><![CDATA[<p>I believe there is a bug in the loadBeforeSend method.</p>
<p>If I override this event and set some ID field to pass back to the server, on initial load, the ID that is set does not appear to be passed in the POST request.</p>
<p>IE - I have a simple grid with employees.&#160; One can enter their last name into a text box and click a search button to search for the employee.&#160; No matter what is entered on the first search (page load), all employees are returned.&#160; Clicking the search button a 2nd and subsequent times returns the correct result set.</p>
<p>I viewed the XHR with Firebug and confirmed that a blank value is being passed in the POST method on the first search.</p>
</p>
<p>My code is pretty simple.&#160; I simply set the loadBeforeSend property of the grid to call this function:</p>
</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#gridEmp&#39;).appendPostData({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lastName: $("#TextBox1").val()<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
</p>
<p>Right now, the only way I have found to fix this is to not use the loadBeforeSend override.&#160; I have made a function that instantiates my grid and passes the &#39;initial&#39; post data to it on through a jQuery ready function.&#160; For subsequent POST data, I use other events (like row select) or handle appending/setting the POST data outside of the grid as in the case of my simple search.</p>
</p>
<p>Anyhelp is appreciated.</p>
]]></description>
        	        	<pubDate>Mon, 25 Aug 2008 15:51:00 +0300</pubDate>
        </item>
</channel>
</rss>