<?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: Get jqGrid to refresh everytime a jQuery-UI modal dialog is displayed.</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/get-jqgrid-to-refresh-everytime-a-jquery-ui-modal-dialog-is-displayed</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/get-jqgrid-to-refresh-everytime-a-jquery-ui-modal-dialog-is-displayed/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Get jqGrid to refresh everytime a jQuery-UI modal dialog is displayed.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/get-jqgrid-to-refresh-everytime-a-jquery-ui-modal-dialog-is-displayed#p13534</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/get-jqgrid-to-refresh-everytime-a-jquery-ui-modal-dialog-is-displayed#p13534</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Yes it is the correct way.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sun, 03 Jan 2010 19:11:51 +0200</pubDate>
        </item>
        <item>
        	<title>smanning on Get jqGrid to refresh everytime a jQuery-UI modal dialog is displayed.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/get-jqgrid-to-refresh-everytime-a-jquery-ui-modal-dialog-is-displayed#p13494</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/get-jqgrid-to-refresh-everytime-a-jquery-ui-modal-dialog-is-displayed#p13494</guid>
        	        	<description><![CDATA[<p>Seems to work if I use "GridUnload":</p>
</p>
<p>$(&#39;#homeLocationSearchGrid&#39;).jqGrid(&#39;GridUnload&#39;);</p>
</p>
<p>Not sure if this is the correct way to do it works.</p>
]]></description>
        	        	<pubDate>Fri, 01 Jan 2010 07:57:12 +0200</pubDate>
        </item>
        <item>
        	<title>Sean on Get jqGrid to refresh everytime a jQuery-UI modal dialog is displayed.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/get-jqgrid-to-refresh-everytime-a-jquery-ui-modal-dialog-is-displayed#p13493</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/get-jqgrid-to-refresh-everytime-a-jquery-ui-modal-dialog-is-displayed#p13493</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>I&#39;m trying to use a modal dialog from the jQuery-UI project to display a jqGrid.&#160; When I first coded it I was associating the jqGrid to the #homeLocationSearchGrid element of the #homeLocationSearchDialog in the ready function.&#160; It displayed correctly, but the jqGrid was getting populated when the page first loaded which I didn&#39;t want.&#160; I wanted it to load the jqGrid whenever the button was pushed that pops up the dialog box.&#160; The jqGrid didn&#39;t seem to have a way to tell it not to populate when it is initially instantiated.&#160; Is there a way to do that?&#160; Since I couldn&#39;t find out how to do that, I modified my code (see below) to attach the jqGrid to the #homeLocationSearchGrid element every time the button is pushed.&#160; However, I don&#39;t see the XHR request going through after the first display of the dialog box.&#160; So then I wanted to disassociate the jqGrid everytime the dialog was closed, but I didn&#39;t really know how to do that.&#160; I puta call to GridDestroy in the "close" method of the dialog box.&#160; However, after I close the dialog the first time, all subsequent displays of it don&#39;t have the jqGrid inside.&#160; Can anyone help me on this?&#160; Thanks!</p>
</p>
<p>Sean</p>
<p>&#160;&#160;&#160; $(document).ready(function() {<br />&#160;&#160;&#160; &#160;&#160;&#160; // Create date picker for effective date input field.<br />&#160;&#160;&#160; &#160;&#160;&#160; $(&#39;#effectiveDate&#39;).datepicker();</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; // Setup the home location search popup window.<br />&#160;&#160;&#160; &#160;&#160;&#160; var searchDialog = $(&#39;&#60;div id="homeLocationSearchDialog"&#62;&#60;/div&#62;&#39;)<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; .html(&#39;&#60;div&#62;&#60;table id="homeLocationSearchGrid"&#62;&#60;/table&#62;&#60;/div&#62;&#60;div id="homeLocationSearchPager"&#62;&#60;/div&#62;&#39;)<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; .dialog({<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; altRows: true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; autoOpen: false,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; close: function(event, ui) {</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1251' value='Select Code' data-codeid='sfcode1251' /></p>
<div class='sfcode' id='sfcode1251'>$(&#39;#homeLocationSearchGrid&#39;).jqGrid(&#39;GridDestroy&#39;);</div>
<p>&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; },<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; modal: true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; title: &#39;Find Home Location&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; width: 1100<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; });</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; // Attach the home location popup to the home location search button.<br />&#160;&#160;&#160; &#160;&#160;&#160; $(&#39;#homeLocationSearchButton&#39;).click(function() {</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#homeLocationSearchGrid&#39;).jqGrid({<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: &#39;&#60;c:out value="${homeLocationSeasrchUrl}" /&#62;&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;xml&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; mtype: &#39;GET&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [&#39;Location ID&#39;, &#39;Location Name&#39;, &#39;Address 1&#39;, &#39;Address 2&#39;, &#39;City&#39;, &#39;State&#39;, &#39;Zip Code&#39;],<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: [<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name: &#39;locationId&#39;, index: &#39;locationId&#39;},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name: &#39;locationName&#39;, index: &#39;locationName&#39;},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name: &#39;address1&#39;, index: &#39;address1&#39;},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name: &#39;address2&#39;, index: &#39;address2&#39;},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name: &#39;city&#39;, index: &#39;city&#39;},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name: &#39;state&#39;, index: &#39;state&#39;},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name: &#39;zipCode&#39;, index: &#39;zipCode&#39;}<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160; rowNum: 10,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowList: [10, 25, 50],<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: &#39;#homeLocationSearchPager&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;locationId&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; viewrecords: true<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; searchDialog.dialog(&#39;open&#39;);<br />&#160;&#160;&#160; &#160;&#160;&#160; });<br />&#160;&#160;&#160; });</p>
]]></description>
        	        	<pubDate>Fri, 01 Jan 2010 06:58:09 +0200</pubDate>
        </item>
</channel>
</rss>