<?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: Newbie Question?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/newbie-question</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/newbie-question/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Newbie Question?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/newbie-question#p5287</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/newbie-question#p5287</guid>
        	        	<description><![CDATA[<p>Hello Paul,</p>
<p>The short answer.</p>
<p>When you click first time the button, the grid is created and the data is populated - this is ok, but when you click second time to the button the grid is already created and you can not create it again using your approach</p>
<p>There are some way to overcome this.</p>
<p>1. Before creating a grid you can apply GridUnload method to restore the element to its default state.</p>
<p>2. There are more elegant way</p>
</p>
<p>$("#mygrid").jqGrid({datatype:"local"....}).setGridParam({datatype:"xml"});</p>
<p>and when you click your button</p>
<p>$("#mybutton").click(function() {</p>
<p>thisURL= .....</p>
<p>$("#mygrid").setGridParam({url:thisURL}).trigger("reloadGrid");</p>
<p>});</p>
</p>
<p>Hope this helps</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 12 Mar 2009 12:11:34 +0200</pubDate>
        </item>
        <item>
        	<title>paulgruhn on Newbie Question?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/newbie-question#p5250</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/newbie-question#p5250</guid>
        	        	<description><![CDATA[<p>First of all, thank you to all the jquery &#38; jqgrid Gods for making this possible.&#160;&#160; I am very new to jquery &#38; jqgrid, but I am a truly new convert, it is taking me to the next level.&#160; Okay, enough with the &#8230;&#8230;.</p>
<p>A little context, I am using webMethods 7.1 to call a dsp page which does all the work.&#160; It&#39;s pretty slick.&#160; I have a nice little query service that is the &#39;ur&#39;l variable and it does a http response as expected.</p>
<p>Here&#39;s my question.</p>
<p>- I am not using the &#39;searching&#39; stuff yet.</p>
<p>I do have a form, with 7 data entry fields, when the user pushes a &#39;button&#39; the form is validated, the &#39;url&#39; variable is created to pass my server side service the needed query parameters, and then runs the query, and the grid is popluated as expected&#8230;. When this happened, I fell in love.</p>
<p>When pressing the next-page, last-page, etc, the calls to the server are made and the correct results are returned&#8230;.. so far so good, we are happy.</p>
<p>However, when I make a simple change to one of the form elements, and then press my button, I get to the form validation javascript, get to my javascript that builds a revised &#39;url&#39; variable, but the query is not called&#8230;&#8230; so sad.</p>
<p>Here is my code:</p>
<p>//------------------------------------------------------------------------------------------------ Does heavy lifting, build DBGrid<br />function doQuery() {</p>
<p>if (validateInput()) {<br />&#160; jQuery(document).ready(function(){&#160;&#160; </p>
<p>//------------------------------------------------------------------------------------------------ Create full url <br />&#160;&#160;&#160; var thisURL = top.document.findMe.in_URL.value + &#39;?q=&#39;;<br />&#160;&#160;&#160; thisURL = thisURL + &#39;&#38;in_uid=&#39;&#160;&#160;&#160;&#160;&#160;&#160; + top.document.findMe.in_uid.value;<br />&#160;&#160;&#160; thisURL = thisURL + &#39;&#38;in_today=&#39;&#160;&#160;&#160;&#160; + top.document.findMe.in_today.checked;<br />&#160;&#160;&#160; thisURL = thisURL + &#39;&#38;in_startDate=&#39; + top.document.findMe.in_startDate.value;<br />&#160;&#160;&#160; thisURL = thisURL + &#39;&#38;in_endDate=&#39;&#160;&#160; + top.document.findMe.in_endDate.value;<br />&#160;&#160;&#160; thisURL = thisURL + &#39;&#38;in_appcode=&#39;&#160;&#160; + top.document.findMe.in_appcode.value;<br />&#160;&#160;&#160; thisURL = thisURL + &#39;&#38;in_pacuid=&#39;&#160;&#160;&#160; + top.document.findMe.in_pacuid.value;<br />&#160;&#160;&#160; thisURL = thisURL + &#39;&#38;in_seruid=&#39;&#160;&#160;&#160; + top.document.findMe.in_seruid.value;</p>
<p>alert(&#39;Testing: &#39; + thisURL);</p>
<p>//------------------------------------------------------------------------------------------------ jqGrid Stuff<br />&#160;&#160;&#160; jQuery(&#39;#mylist&#39;).jqGrid({<br />&#160;&#160;&#160;&#160;&#160; url:thisURL,<br />&#160;&#160;&#160;&#160;&#160; datatype: &#39;xml&#39;,<br />&#160;&#160;&#160;&#160;&#160; mtype: &#39;GET&#39;,<br />&#160;&#160;&#160;&#160;&#160; colNames:[&#39;Date&#39;,&#39;Time&#39;,&#39;UID&#39;,&#39;Application&#39;,&#39;Package&#39;,&#39;Service&#39;,&#39;Ref&#39;,&#39;Message&#39;],<br />&#160;&#160;&#160;&#160;&#160; colModel :[ <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;date&#39;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ,width:76&#160;&#160; ,sortable:false}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;time&#39;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ,width:78&#160;&#160; ,sortable:false}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;uid&#39;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ,width:132&#160; ,sortable:false}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;application&#39;&#160; ,width:80&#160;&#160; ,sortable:false}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;package&#39;&#160;&#160;&#160;&#160;&#160; ,width:110&#160; ,sortable:false}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;service&#39;&#160;&#160;&#160;&#160;&#160; ,width:150&#160; ,sortable:false}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;cRef&#39;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ,width:35&#160;&#160; ,sortable:false},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;message&#39;&#160;&#160;&#160;&#160;&#160; ,width:490&#160; ,sortable:false}],<br />&#160;&#160;&#160;&#160;&#160; pager: jQuery(&#39;#pager&#39;),<br />&#160;&#160;&#160;&#160;&#160; rowNum:25,<br />&#160;&#160;&#160;&#160;&#160; rowList:[25,50,75,100,250,500,1000],<br />&#160;&#160;&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160;&#160;&#160; loadonce: false,<br />&#160;&#160;&#160;&#160;&#160; height:300,<br />&#160;&#160;&#160;&#160;&#160; imgpath: &#39;../../YaleCore/themes/basic/images&#39;,<br />&#160;&#160;&#160;&#160;&#160; caption: &#39;Results&#39;<br />&#160;&#160;&#160; }); <br />&#160; }); <br />} // endif<br />} // end function doQuery</p>
</p>
<p>I know that I am getting to the alert() and the proper url is being created.&#160; But, the url is not getting kicked offed.&#160; I have a debug statement in the service that it is doing the working and it doesn&#39;t get kicked off on the second time around pushing the &#39;button&#39;</p>
<p>What am I missing?&#160; Any help would be welcomed.</p>
<p>Thanks in advanced.</p>
<p>Paul</p>
]]></description>
        	        	<pubDate>Wed, 11 Mar 2009 14:13:03 +0200</pubDate>
        </item>
</channel>
</rss>