<?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: Problem with JQGrid in Modal Dialog after reload page</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/problem-with-jqgrid-in-modal-dialog-after-reload-page</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/problem-with-jqgrid-in-modal-dialog-after-reload-page/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>cawa on Problem with JQGrid in Modal Dialog after reload page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problem-with-jqgrid-in-modal-dialog-after-reload-page#p23943</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problem-with-jqgrid-in-modal-dialog-after-reload-page#p23943</guid>
        	        	<description><![CDATA[<p>I had a problem opening a Modal Dialog after page reload. I solved using "class identifier" instead of "id".</p>
<p>but now I&#39;m stuck on another problem.</p>
<p>In the Modal Dialog I have a JQGrid:</p>
<p>In example.jsp I press the button "RELOAD". Then, in "mainContent", appears the button "FIND", that open a modal dialog with a JQGrid perfectly working.</p>
<p>But if I press again "RELOAD" button and then "FIND" the MODAL DIALOG appears, but the JQGRID in it doesn&#39;t show any result!</p>
<p>&#39;cause it seemed to be a "creating elements with same id" problem, I try to call the JQGrid with class identifier, but nothing.</p>
</p>
<p>Here an example: <a href="http://web.ire-omba.it:8080/prev/esempio.jsp" rel="nofollow" target="_blank"><a href="http://web.ire-omba.it:8080/pr" rel="nofollow">http://web.ire-omba.it:8080/pr</a>.....sempio.jsp</a></p>
<p>example.jsp:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8659' value='Select Code' data-codeid='sfcode8659' /></p>
<div class='sfcode' id='sfcode8659'>&#60;script type=&#34;text/javascript&#34;&#62;<br />&#160; $(document).ready(function() {<br />&#160; &#160; $(&#39;#Button1&#39;).button().click(function() {<br /> &#160; &#160; $(&#34;#mainContent&#34;).html(&#39;&#39;).load(&#34;example_1.jsp&#34;);<br />&#160; &#160; });<br />&#160; });<br />&#60;/script&#62;<br />&#60;input id=&#34;Button1&#34; type=&#34;button&#34; value=&#34;RELOAD&#34; /&#62;<br />&#60;div id=&#34;mainContent&#34;&#62;&#60;/div&#62;</div>
<p>example_1.jsp:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8206' value='Select Code' data-codeid='sfcode8206' /></p>
<div class='sfcode' id='sfcode8206'>&#60;script type=&#34;text/javascript&#34;&#62;<br />&#160; $(document).ready(function() {<br />&#160; &#160; $(&#34;.b&#34;).button().click(function() {<br />&#160; &#160; &#160; $(&#34;.d&#34;).jqGrid(&#39;setGridParam&#39;,{datatype:&#34;json&#34;}).trigger(&#34;reloadGrid&#34;);<br />&#160; &#160; &#160; $(&#34;.c&#34;).dialog(&#34;open&#34;);<br />&#160; &#160; });</p>
<p>&#160; &#160; $(&#34;#a_grid&#34;).jqGrid({<br />&#160; &#160; &#160; url:&#39;search_customer.jsp&#39;,<br />&#160; &#160; &#160; datatype: &#39;local&#39;,<br />&#160; &#160; &#160; mtype: &#39;GET&#39;,<br />&#160; &#160; &#160; colNames:[&#39;Sede&#39;,&#39;Codice&#39;,&#39;Ragione Sociale&#39;],<br />&#160; &#160; &#160; colModel :[<br />&#160; &#160; &#160; &#160; {name:&#39;sede&#39;, index:&#39;sede&#39;, width:20, search:true, stype:&#39;select&#39;, edittype:&#39;select&#39;, editoptions:{value:{&#39;IT&#39;:&#39;IT&#39;,&#39;CN&#39;:&#39;CN&#39;}}, searchoptions:{value:&#34;:All;IT:IT;CN:CN&#34;}, editable:true, editrules:{required:true}},<br />&#160; &#160; &#160; &#160; {name:&#39;codice_cliente&#39;, index:&#39;codice_cliente&#39;, width:100, fixed:true, search:true, stype:&#39;text&#39;, editable:true, editoptions:{size:6, maxlength:6}, editrules:{required:true}},<br />&#160; &#160; &#160; &#160; {name:&#39;cliente&#39;, index:&#39;cliente&#39;, search:true, stype:&#39;text&#39;, editable:true, editoptions:{size:30, maxlength:50}, &#160;editrules:{required:true}}<br />&#160; &#160; &#160; ],<br />&#160; &#160; &#160; pager: jQuery(&#39;#a_pager&#39;),<br />&#160; &#160; &#160; rowNum:15,<br />&#160; &#160; &#160; sortname: &#39;cliente&#39;,<br />&#160; &#160; &#160; sortorder: &#39;asc&#39;,<br />&#160; &#160; &#160; gridwiew: true,<br />&#160; &#160; &#160; viewrecords: true,<br />&#160; &#160; &#160; loadonce:false,<br />&#160; &#160; &#160; &#8230;<br />&#160; &#160; &#160; &#8230;<br />&#160; &#160; });</p>
<p>&#160; &#160; jQuery(&#34;#a_grid&#34;).jqGrid(&#39;navGrid&#39;,&#39;#a_pager&#39;, {edit:false, add:true, del:false, search:false, refresh:true},<br />&#160; &#160; &#160; {}, // edit options<br />&#160; &#160; &#160; {}, // add options<br />&#160; &#160; &#160; {}, //del options<br />&#160; &#160; &#160; {multipleSearch:true} //search options<br />&#160; &#160; );</p>
<p>&#160; &#160; jQuery(&#34;#a_grid&#34;).jqGrid(&#39;filterToolbar&#39;,{stringResult:true, searchOnEnter:false});</p>
<p>&#160; &#160; $(&#34;#a_form&#34;).dialog({<br />&#160; &#160; &#160; autoOpen: false,<br />&#160; &#160; &#160; height: 480,<br />&#160; &#160; &#160; width: 625,<br />&#160; &#160; &#160; modal: true,<br />&#160; &#160; &#160; close: function() {<br />&#160; &#160; &#160; &#160; $(&#34;#a_grid&#34;).dialog(&#34;close&#34;);<br />&#160; &#160; &#160; }<br />&#160; &#160; });<br />&#160; });<br />&#60;/script&#62;</p>
<p>&#60;input type=&#34;button&#34; value=&#34;FIND&#34; class=&#34;b&#34; /&#62;</p>
<p>&#60;div id=&#34;a_form&#34; title=&#34;Cerca Cliente&#34; class=&#34;c&#34;&#62;<br />&#160; &#60;table id=&#34;a_grid&#34; align=&#34;center&#34; class=&#34;d&#34;&#62;&#60;/table&#62; <br />&#160; &#60;div id=&#34;a_pager&#34; align=&#34;center&#34;&#62;&#60;/div&#62;<br />&#60;/div&#62;</p>
</div>
<p> Thank you. </p>
]]></description>
        	        	<pubDate>Tue, 12 Jul 2011 15:22:29 +0300</pubDate>
        </item>
</channel>
</rss>