<?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: Search (advanced + normal) is not working in second instance of a jqGrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/search-advanced-normal-is-not-working-in-second-instance-of-a-jqgrid</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/bugs/search-advanced-normal-is-not-working-in-second-instance-of-a-jqgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>JKnippschild on Search (advanced + normal) is not working in second instance of a jqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/search-advanced-normal-is-not-working-in-second-instance-of-a-jqgrid#p22506</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/search-advanced-normal-is-not-working-in-second-instance-of-a-jqgrid#p22506</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>First I must ask for forgiveness about the vagueness of specific details, code and the obscuring of certain parts in the attached screenshot. I&#39;m under a CDA for this project as well as under restrictions from HIPAA.. so in the interest of privacy for patients and medical entities, I must be vague. Also, due to the fact this is in development, to avoid competition issues, I must also obscure branding and product names.</p>
</p>
<p>Now the problem I&#39;m having:</p>
</p>
<p>I have a jqGrid that lists all sites attached to a particular drug study. When you click on a row it brings up a jQueryUI modal .dialog() with tabs. On one of the tabs is a second jqGrid instance that lists all subjects under that site. (Relationship Hierarchy is Study-&#62;Site-&#62;Subject). The grids both come from an object that is iterated and added with .<strong>jqGrid(&#39;addRowData&#39;,....);</strong></p>
</p>
<p>The problem I just discovered is that when I enable the search button for the second jqGrid&#39;s pager, the input field where you input the search criteria does not accept any text or even allow me to place a cursor in the field. It allows me to select a field to search against, and it does properly list all the fields for the second jqGrid.</p>
</p>
<p>The search feature works perfectly on the first instance, which makes me think there is some sort of collision between the two instances. Please note that I am not using any custom search function for either instance.</p>
</p>
<p>Here is the instantiation call for the site list, called within a $(document).ready() function</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4613' value='Select Code' data-codeid='sfcode4613' /></p>
<div class='sfcode' id='sfcode4613'>&#160;&#160; &#160;&#160;&#160;&#160; $(&#34;#patientList&#34;).jqGrid(<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;datatype: &#34;local&#34;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;width: 700,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;height:330,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;pager: &#39;#patientPager&#39;,<br />&#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; &#160;rowNum: 15,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colNames: [&#39;<strong>-REDACTED-</strong>&#39;, &#39;Patient #&#39;, &#39;Initials&#39;, &#39;Gender&#39;, &#34;Date of Birth&#34;, &#39;<strong>-REDACTED-</strong>&#39;, &#34;CRF&#34;, &#39;SAE&#39;, &#39;Mortality&#39;],<br />&#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;{name:&#39;<strong>-REDACTED-</strong>&#39;,index:&#39;<strong>-REDACTED-</strong>&#39;, width:70, sorttype:&#34;int&#34;, hidden: true},<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;{name: &#39;ClientPatientNumber&#39;, index:&#39;ClientPatientNumber&#39;, width: 70, sorttype:&#34;text&#34;},</p>
<p>&#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;initials&#39;, index:&#39;initials&#39;, width: 40, sorttype:&#34;text&#34;},<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;{name: &#39;Gender&#39;, index:&#39;Gender&#39;, width: 40, sorttype:&#34;text&#34;},<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;{name: &#39;DOB&#39;, index:&#39;DOB&#39;, width: 65, sorttype:&#34;date&#34;, datefmt: &#34;M/d/Y&#34;},<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;{name: &#39;<strong>-REDACTED-</strong>&#39;, index:&#39;<strong>-REDACTED-</strong>&#39;, width: 45, sorttype:&#34;text&#34;},<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;{name: &#39;CRF&#39;, index:&#39;CRF&#39;, width: 35, sorttype:&#34;text&#34;},<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;{name: &#39;isSAE&#39;, index:&#39;isSAE&#39;, width: 35, sorttype:&#34;text&#34;},<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;{name: &#39;isDeceased&#39;, index:&#39;isDeceased&#39;, width: 45, sorttype:&#34;text&#34;}<br />&#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;}<br />&#160;&#160; &#160;&#160;&#160; &#160;).navGrid(&#39;#patientPager&#39;,{view:true, del:false, edit: false }, <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;{}, // use default settings for edit<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;{}, // use default settings for add<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; // delete instead that del:false we need this<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;{multipleSearch : true}, // enable the advanced searching<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;{closeOnEscape:false} /* allow the view dialog to be closed when user press ESC key*/<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;);<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;$(&#34;#siteList&#34;).jqGrid({<br />&#160;&#160; &#160;&#160;&#160; &#160;caption: &#34;Study Sites in &#60;?php echo $currentUser-&#62;getProject(); ?&#62;&#34;,<br />&#160;&#160; &#160;&#160;&#160; &#160;datatype: &#34;local&#34;,<br />&#160;&#160; &#160;&#160;&#160; &#160;height: 400,<br />&#160;&#160; &#160;&#160;&#160; &#160;pager: &#39;#pager&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;rowNum: siteList.length,<br />&#160;&#160; &#160;&#160;&#160; &#160;cloneToTop: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;//rowList:[10,20,30,40,50], <br />&#160;&#160; &#160;&#160;&#160; &#160;colNames:[&#39;ID&#39;, &#39;Site #&#39;, &#39;Protocol #&#39;, &#39;Site Name&#39;, &#39;Total Subjects&#39;, &#39;<strong>-REDACTED-</strong>&#39;, &#39;<strong>-REDACTED-</strong>&#39;, &#39;SAE Subjects&#39;, &#39;Deceased Subjects&#39; ],<br />&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true, <br />&#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;{name:&#39;id&#39;,index:&#39;id&#39;, width:70, sorttype:&#34;int&#34;, hidden: true},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;ClientSiteNum&#39;,index:&#39;ClientSiteNum&#39;, width:55, sorttype:&#34;text&#34;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;Protocol#&#39;,index:&#39;Protocol#&#39;, width:100, sorttype:&#34;text&#34;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;SiteName&#39;,index:&#39;SiteName&#39;, width:160, sorttype:&#34;text&#34;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;TotalSubjects&#39;,index:&#39;TotalSubjects&#39;, align: &#39;right&#39;, width:100, sorttype:&#34;int&#34;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;<strong>-REDACTED-</strong>&#39;,index:&#39;<strong>-REDACTED-</strong>&#39;, align: &#39;right&#39;, width:100, sorttype:&#34;int&#34;}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;<strong>-REDACTED-</strong>&#39;,index:&#39;<strong>-REDACTED-</strong>&#39;, align: &#39;right&#39;,width:120, sorttype:&#34;int&#34;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;SAESubjects&#39;,index:&#39;SAESubjects&#39;, width:110, align: &#39;right&#39;, sorttype:&#34;int&#34;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;DeceasedSubjects&#39;,index:&#39;DeceasedSubjects&#39;, align: &#39;right&#39;, width:120, sorttype:&#34;int&#34;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; ],<br />&#160;&#160; &#160;&#160;&#160; &#160;sortname: &#39;SiteName&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;sortorder: &#34;asc&#34;, </p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;onSelectRow: function (ids) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;populateInformationDialog(ids);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$( &#34;#siteInfoDialog&#34; ).dialog( &#34;option&#34;, &#34;title&#34;, &#34;Site Information for Site #&#34;+$(this).jqGrid(&#34;getCell&#34;, ids, &#39;ClientSiteNum&#39; ) +&#34; - &#34;+$(this).jqGrid(&#34;getCell&#34;, ids, &#39;SiteName&#39; ));<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$(&#34;#siteInfoDialog&#34;).dialog(&#34;open&#34;);<br />&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;});</p>
</div>
<p>This is my first time using in jqGrid but I can&#39;t figure out why it&#39;s happening. That said, it might be something extremely tiny and mundane that I overlooked, but it might also be a bug with jqGrid itself. I&#39;d appreciate any feedback as my deadline for the entire product is coming up very soon, and the decision to use jqGrid was a last minute decision.</p>
<p>Here&#39;s a screenshot for some context, click to enlarge:</p>
</p>
<p><a href="http://img204.imageshack.us/img204/6931/bugreportw.jpg" target="_blank"></a><a href="http://img204.imageshack.us/img204/6931/bugreportw.jpg"><img src="http://img204.imageshack.us/img204/6931/bugreportw.jpg" width="100"  style="float: left; border: 0;" class="spUserImage" alt="" /><img src="http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_Mouse.png" class=" sfmouseother" alt="Image Enlarger" /></a></p>
]]></description>
        	        	<pubDate>Tue, 22 Mar 2011 00:01:07 +0200</pubDate>
        </item>
</channel>
</rss>