<?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: Master/Detail  freezes after add - edit cancellation</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/masterdetail-freezes-after-add-edit-cancellation</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/masterdetail-freezes-after-add-edit-cancellation/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>stevansremac on Master/Detail  freezes after add - edit cancellation</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/masterdetail-freezes-after-add-edit-cancellation#p26912</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/masterdetail-freezes-after-add-edit-cancellation#p26912</guid>
        	        	<description><![CDATA[<p>Problem: master grid on onSelectRow displays detail grid correctly (#Mail) until I select add/edit in detail grid&#8230;</p>
<p>After that row in #Mail stays selected and frozen</p>
<p>After that selecting rows in master grid</p>
<p>generate error&#160; in JqGrid.src.js ( row 3249) im detail grid</p>
<p>this.p is undefined</p>
</p>
<p>setCaption : function (newcap){</p>
<div id="sb43-L3248" class="sourceRow">return this.each(function(){</div>
<div id="sb43-L3249" class="sourceRow ">this.p.caption=newcap;</div>
<div id="sb43-L3250" class="sourceRow">$("span.ui-jqgrid-title,span.ui-jqgrid-title-rtl",this.grid.cDiv).html(newcap);</div>
<div id="sb43-L3251" class="sourceRow">$(this.grid.cDiv).show();</div>
<div id="sb43-L3252" class="sourceRow">});</div>
<div class="sourceRow">HELP PLEASE!!!</div>
</p>
<p>used script:</p>
<p>&#60;script&#160; type="text/javascript" src="script/jquery-1.7.2.min.js"&#62;&#60;/script&#62;<br />&#60;link rel="stylesheet" type="text/css" media="screen" href="script/jquery-ui-1.8.21.custom.css" /&#62;<br />&#60;link rel="stylesheet" type="text/css" media="screen" href="script/ui.jqgrid.css" /&#62;<br />&#60;script src="script/grid.locale-sr-latin.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#60;script src="script/jquery.jqGrid.src.js" type="text/javascript"&#62;&#60;/script&#62;</p>
</p>
<p>js:</p>
<p> $(document).ready(function() <br />{</p>
<p>jQuery("#list2&#8243;).jqGrid({ <br />url:&#39;load.php?q=2&#39;,<br />datatype: "json", <br />colNames:[&#39;id&#39;,&#39;STATUS&#39;,&#39;IME&#39;,&#39;PREZIME&#39;,&#39;GODISTE&#39;,&#39;ADRESA&#39;,&#39;GRAD&#39;,&#39;OP&#352;TINA&#39;,&#39;ZEMLJA&#39;,&#39;POL&#39;,&#39;BROJ DECE&#39;,&#39;OZNAKA POREKLA&#39;,&#39;TIP ÄŒLANSTVA&#39;],</p>
<p>colModel:[ <br />{name:&#39;id&#39;, key:true, index:&#39;id&#39;, width:35},<br />{name:&#39;statusi&#39;,index:&#39;statusi&#39;, width:60,editable:true,hidden: true , editrules: {edithidden:true}, searchoptions: {searchhidden: true}},<br />{name:&#39;ime&#39;,index:&#39;ime&#39;, width:70,editable:true,search: true},<br />{name:&#39;prezime&#39;,index:&#39;prezime&#39;, width:115, align:"center",editable: true}, <br />{name:&#39;DatumRodjenja&#39;,index:&#39;DatumRodjenja&#39;, width:58, align:"center",editable:true,searchtype:"number"}, <br />{name:&#39;Adresa&#39;,index:&#39;Adresa&#39;, width:180,align:"center",editable:true},<br />{name:&#39;Grad&#39;,index:&#39;Grad&#39;, width:80,align:"center",editable:true},<br />{name:&#39;Opstina&#39;,index:&#39;Opstina&#39;, width:80,align:"center",editable:true}, <br />{name:&#39;Zemlja&#39;,index:&#39;Zemlja&#39;, width:80,align:"center",editable:true},<br />{name:&#39;Pol&#39;,index:&#39;Pol&#39;, width:30,align:"center",editable:true},<br />{name:&#39;brojDece&#39;,index:&#39;brojDece&#39;, width:70,align:"center",editable:true},<br />{name:&#39;OznakaPorekla&#39;,index:&#39;OznakaPorekla&#39;, width:120,align:"center",editable:true},<br />{name:&#39;TipClanstva&#39;,index:&#39;TipClanstva&#39;, width:100,align:"center",editable:true}<br />], <br />&#160;&#160; &#160;&#160; height: &#39;auto&#39;,<br />&#160;&#160; &#160;&#160; rowNum:20, <br />&#160;&#160; &#160;&#160; rowList:[5,10,20,30,40,50,60,70,80,90,100],<br />&#160;&#160; &#160;&#160; pager: &#39;#pager2&#39;,<br />&#160;&#160; &#160;&#160; sortname: &#39;id&#39;, <br />&#160;&#160; &#160;&#160; viewrecords: true, <br />&#160;&#160; &#160;&#160; sortorder: "desc", <br />&#160;&#160; &#160;&#160; multiselect: false,<br />&#160;&#160; &#160;&#160; gridview: true,<br />&#160;&#160; &#160;&#160; jsonReader: {repeatitems: false,id:"0&#8243;},<br />&#160;&#160; &#160;onSelectRow: function(ids) <br />&#160;&#160; &#160;{ <br />&#160;&#160; &#160;jQuery("#Mail").jqGrid(&#39;setGridParam&#39;,{url:"subgrid2.php?q=5&#38;id="+ids,page:1});&#160;&#160; &#160;<br />&#160;&#160;&#160; &#160;jQuery("#Mail").jqGrid(&#39;setCaption&#39;,"MAIL: ").trigger(&#39;reloadGrid&#39;); <br />&#160;&#160; },<br />&#160;&#160; editurl:"someurl.php",&#160; &#160;<br />&#160; caption:"fsd" });<br />&#160; jQuery("#list2&#8243;).jqGrid(&#39;filterToolbar&#39;,{stringResult: true,searchOnEnter : false});<br />&#160; </p>
<p>&#160; <br />//MAIL<br />jQuery("#Mail").jqGrid({ <br />&#160; height: &#39;auto&#39;, <br />&#160; pager: &#39;#pagerMail&#39;, <br />&#160; url:&#39;subgrid2.php?q=2&#38;id=&#39;, <br />&#160; editurl:"someurl.php",<br />&#160; datatype: "json", <br />&#160; colNames:[&#39;ClanID&#39;,&#39;Mail&#39;,&#39;Napomena&#39;], <br />&#160;&#160; &#160;colModel:[ <br />&#160;&#160; &#160;{name:&#39;ClanId&#39;,index:&#39;ClanId&#39;, width:60,hidden: true },<br />&#160;&#160; &#160;{name:&#39;Mail&#39;,index:&#39;Mail&#39;, width:155,editable:true,formatter:&#39;email&#39;}, <br />&#160;&#160; &#160;{name:&#39;Napomena&#39;,index:&#39;Napomena&#39;, width:180,editable:true},<br />&#160;&#160; &#160;],</p>
<p>&#160;&#160; &#160;height:&#39;auto&#39;,<br />&#160;&#160; &#160;rowNum:1, <br />&#160;&#160; &#160;rowList:[5,10,20], <br />&#160;&#160; &#160;sortname: &#39;Mail&#39;,<br />&#160;&#160; &#160;viewrecords: true,<br />&#160;&#160; &#160;sortorder: &#39;asc&#39;,<br />&#160;&#160; &#160;multiselect: false, <br />&#160;&#160; &#160;rowList: [],&#160;&#160;&#160;&#160;&#160;&#160;&#160; // disable page size dropdown<br />&#160;&#160; &#160;pgbuttons: false,&#160;&#160;&#160;&#160; // disable page control like next, back button<br />&#160;&#160; &#160;pgtext: null,<br />&#160;&#160; &#160;caption:"Mail"<br />})</p>
<p>jQuery("#Mail").jqGrid(&#39;navGrid&#39;,&#39;#pagerMail&#39;, {}, //options <br />{beforeShowForm: function(formid) <br />{<br />&#160;jQuery("#Mail").setGridParam({editurl:"myurlhere.php?q=edit"});<br />}}, // edit options <br />{<br />&#160;&#160; &#160;beforeShowForm: function(formid) {</p>
<p>&#160; mid = jQuery("#list2&#8243;).getGridParam("selrow");<br />&#160;&#160; &#160;if (mid != null ) <br />&#160;&#160; &#160;jQuery("#Mail").setGridParam({editurl:"myurlhere.php?q=add&#38;ClanId="+mid});</p>
<p>}}, // add options <br />{&#160;&#160; &#160;<br />beforeShowForm: function(formid) <br />{<br />&#160; mid = jQuery("#list2&#8243;).getGridParam("selrow");<br />&#160; if (mid != null ) <br />&#160;&#160; &#160;&#160; jQuery("#Mail").setGridParam({editurl:"myurlhere.php?q=del&#38;ID="+mid});<br />}}, // del options <br />{} // search options<br />&#160;); <br />&#160; </p>
<p>});</p>
]]></description>
        	        	<pubDate>Mon, 09 Jul 2012 06:15:32 +0300</pubDate>
        </item>
</channel>
</rss>