<?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: Is "afterShowForm" event for View &#38; Search in "navGrid" section supported?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/is-aftershowform-event-for-view-search-in-navgrid-section-supported</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/is-aftershowform-event-for-view-search-in-navgrid-section-supported/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>nelsonm on Is "afterShowForm" event for View &#38; Search in "navGrid" section supported?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/is-aftershowform-event-for-view-search-in-navgrid-section-supported#p27525</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/is-aftershowform-event-for-view-search-in-navgrid-section-supported#p27525</guid>
        	        	<description><![CDATA[</p>
<p>Hi all,</p>
<p>It appears that the "afterShowForm" event for View &#38; Search in "navGrid" section is not supported. &#160;Is this correct?</p>
<p>I ask because i currently use jQuery&#39;s ".position" utility to keep jqGrid forms centered in the browser window on load and when the browser window is resized. It works great in the "afterShowForm" event functions for edit, add, and delete forms in the "navGrid" section, but not for view or search.</p>
</p>
<p>The following "afterShowForm" events initially position the jqGrid form in the center of the browser window but the view and search "afterShowForm" event appear not to work:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3610' value='Select Code' data-codeid='sfcode3610' /></p>
<div class='sfcode' id='sfcode3610'>
<p>var wko1EditEventASF = function(formid) {</p>
<p>&#160; &#160;var grid &#160;= formid.selector.replace(&#39;FrmGrid_&#39;,&#39;editmod&#39;);</p>
<p>&#160; &#160;$(&#39;#editmod&#39;+grid).position({my:&#39;center&#39;, at:&#39;center&#39;, of:window, collision: &#39;fit&#39;});</p>
<p>}</p>
</div>
<p><input type='button' class='sfcodeselect' name='sfselectit2550' value='Select Code' data-codeid='sfcode2550' /></p>
<div class='sfcode' id='sfcode2550'>
<p>var wko1DelEventASF = function(formid) {</p>
<p>&#160; &#160;var grid &#160;= formid.selector.replace(&#39;DelTbl_&#39;,&#39;delmod&#39;);</p>
<p>&#160; &#160;$(&#39;#delmod&#39;+grid).position({my:&#39;center&#39;, at:&#39;center&#39;, of:window, collision: &#39;fit&#39;});</p>
<p>}</p>
</div>
<p><input type='button' class='sfcodeselect' name='sfselectit3123' value='Select Code' data-codeid='sfcode3123' /></p>
<div class='sfcode' id='sfcode3123'>
<p>var wko1ViewEventASF = function(formid) {</p>
<p>&#160; &#160;var grid &#160;= formid.selector.replace(&#39;ViewGrid_&#39;,&#39;viewmod&#39;);</p>
<p>&#160; &#160;$(&#39;#viewmod&#39;+grid).position({my:&#39;center&#39;, at:&#39;center&#39;, of:window, collision: &#39;fit&#39;});</p>
<p>}</p>
</div>
<p><input type='button' class='sfcodeselect' name='sfselectit3541' value='Select Code' data-codeid='sfcode3541' /></p>
<div class='sfcode' id='sfcode3541'>
<p>var wko1SearchEventASF = function(formid) {</p>
<p>&#160; &#160;var grid &#160;= formid.selector.replace(&#39;fbox_&#39;,&#39;searchmodfbox_&#39;);</p>
<p>&#160; &#160;$(&#39;#searchmodfbox_&#39;+grid).position({my:&#39;center&#39;, at:&#39;center&#39;, of:window, collision: &#39;fit&#39;});</p>
<p>}</p>
</div>
<p>The following code keeps the position of the jqGrid forms (when one is called for) in the center of the browser window when browser window is resized &#8211; all work:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9769' value='Select Code' data-codeid='sfcode9769' /></p>
<div class='sfcode' id='sfcode9769'>
<p>$(function() {</p>
<p>&#160; &#160;$(window).resize(function(event){</p>
<p>&#160; &#160; &#160; var grid = id of grid.</p>
<p>&#160; &#160; &#160; $(&#39;#editmod&#39;+grid&#160; &#160; &#160; &#160; &#160; &#160; &#160; ).position({my:&#39;center&#39;, at:&#39;center&#39;, of:window, collision: &#39;fit&#39;});</p>
<p>&#160; &#160; &#160; $(&#39;#delmod&#39;+grid &#160; &#160; &#160; &#160; &#160; &#160; &#160; ).position({my:&#39;center&#39;, at:&#39;center&#39;, of:window, collision: &#39;fit&#39;});</p>
<p>&#160; &#160; &#160; $(&#39;#viewmod&#39;+grid&#160;&#160; &#160; &#160; &#160; &#160; &#160; ).position({my:&#39;center&#39;, at:&#39;center&#39;, of:window, collision: &#39;fit&#39;});</p>
<p>&#160; &#160; &#160; $(&#39;#searchmodfbox_&#39;+grid&#160;).position({my:&#39;center&#39;, at:&#39;center&#39;, of:window, collision: &#39;fit&#39;});</p>
<p>&#160; &#160;});</p>
<p>});</p>
</div>
<p>So, it would be nice to be able to trigger the &#160;"afterShowForm" event for View &#38; Search in "navGrid" section.</p>
</p>
<p>Thanks.</p>
]]></description>
        	        	<pubDate>Thu, 11 Oct 2012 20:36:51 +0300</pubDate>
        </item>
</channel>
</rss>