<?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: Filtering Multiple Grids</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids</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/filtering-multiple-grids/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Filtering Multiple Grids</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30753</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30753</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>It all depends where you put this line of code. It is recommended to to this after calling the filterToolbar method.<br />
Another solution of your problem is maybe to use defaultValue in  colModel searchoptions. See docs.</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Wed, 11 Jun 2014 17:26:17 +0300</pubDate>
        </item>
        <item>
        	<title>MartinDawson on Filtering Multiple Grids</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30750</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30750</guid>
        	        	<description><![CDATA[<p>I noticed that and tried it with the additional # too, but it didn't help. I'm using:</p>
<div class="sfcode">
<pre class="brush-javascript syntax">var control = $("#gs_ColumnId", "#gridId");
console.log(control);
control.val('desired data');</pre></div><p>I'm positive the IDs are spelled and capitalized correctly. When I run that, <em>control</em> contains zero selected objects.</p>
<p>Â </p>
<p>Do you happen to know in what version this functionality was added? We're still on version 4.3.2 due to the possibility of breaking changes.</p>
]]></description>
        	        	<pubDate>Tue, 10 Jun 2014 16:31:23 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Filtering Multiple Grids</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30749</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30749</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Sorry I put a wrong code. try this:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6687' value='Select Code' data-codeid='sfcode6687' /></p>
<div class='sfcode' id='sfcode6687'>
<p>$(&#34;#gs_EmpNo&#34;, &#34;#grid1&#34;).val(â€¦);<br />
$(&#34;#gs_EmpNo&#34;, &#34;#grid2&#34;).val(â€¦);</p>
</div>
<p>where grid1 and grid2 are your grid id.</p>
<p>I missed "#" in my previous post</p>
<p>How you set this in your code?</p>
<p>Kind Regards</p>
]]></description>
        	        	<pubDate>Tue, 10 Jun 2014 10:41:39 +0300</pubDate>
        </item>
        <item>
        	<title>MartinDawson on Filtering Multiple Grids</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30747</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30747</guid>
        	        	<description><![CDATA[<p>1. I'm sorry, Tony, but that selector does not work. It returns an empty selection every time.</p>
<p>Â </p>
<p>2. I assure you that the jsonmap property works quite well for the server-to-page data flow.</p>
]]></description>
        	        	<pubDate>Tue, 10 Jun 2014 01:05:03 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Filtering Multiple Grids</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30741</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30741</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>1. You can solve this problem if you use </p>
<p>$("gs_EmpNo", "#grid1").val(...);<br />
$("gs_EmpNo", "#grid2").val(...);</p>
<p>to differentiate the values, </p>
<p>2. This is not correct - the search try first to use the INDEX property and if it is not found it uses the NAME one.<br />
So you can set the index  to post the correct name to database.</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Mon, 09 Jun 2014 14:27:25 +0300</pubDate>
        </item>
        <item>
        	<title>MartinDawson on Filtering Multiple Grids</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30737</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/filtering-multiple-grids#p30737</guid>
        	        	<description><![CDATA[<p>Good evening, everyone. My team has run into two problems related to having more than one jqGrid on a page.</p>
<p>The first problem is that while the grids themselves uniquely identify their components<span class="nodeLabelBox repTarget "><span class="nodeAttr editGroup "><span class="nodeValue editable ">, the search toolbar does not.</span></span></span> Suppose you have two simple grids for displaying lists of sales orders and user notifications respectively:</p>
<div class="sfcode">
<pre class="brush-javascript syntax">colmodel = [{label: "Sales Order ID", name: "SoId", index: "SoId", sortable: true, key: true},
Â Â Â Â Â Â Â Â Â Â Â  {label: "Sold By", name: "EmpNo", index: "EmpNo", sortable: true},
Â Â Â Â Â Â Â Â Â Â Â  {label: "Bought By", name: "CustNo", index: "CustNo", sortable: true}]</pre></div><div class="sfcode">
<pre class="brush-javascript syntax">colmodel = [{label: "Notification ID", name: "NoteId", index: "NoteId", sortable: true, key: true},
Â Â Â Â Â Â Â Â Â Â Â  {label: "User", name: "EmpNo", index: "EmpNo", sortable: true},
Â Â Â Â Â Â Â Â Â Â Â  {label: "Message", name: "Msg", index: "Msg", sortable: true}]</pre></div><p>When the HTML for the page is generated, you will see that the grid rows and cells are uniquely named in the format <span class="nodeLabelBox repTarget "><span class="nodeAttr editGroup ">"</span></span><span class="nodeValue editable "><span class="nodeAttr editGroup "><span class="nodeValue editable ">gridGridName_ColumnName". No problem. However, the filter bars each end up containing id="gs_EmpNo". If we wanted to, for example, default the notification grid to display only the current user's notifications, setting the filter field's value by ID will end up populating the EmpNo field of <em>both</em> grids. Is this a known bug? <span class="nodeValue editable "><span class="nodeAttr editGroup "><span class="nodeValue editable ">Is there a workaround?</span></span></span></span></span></span></p>
<p>Â </p>
<p>The second problem is related to our attempt to work around this. We can use jsonmap to ensure each field is uniquely named:</p>
<div class="sfcode">
<pre class="brush-javascript syntax">colmodel = [{label: "Sales Order ID", jsonmap: "SoId", name: "SoId", index: "SoId", sortable: true, key: true},
            {label: "Sold By", jsonmap: "EmpNo", name: "SoEmpNo", index: "SoEmpNo", sortable: true},
            {label: "Bought By", jsonmap: "CustNo", name: "SoCustNo", index: "SoCustNo", sortable: true}]</pre></div><p>and so on. However, while this populates the grid correctly when there is no filter, the filtering request uses the <em>name</em> property rather than <em>jsonmap</em>. So the database ends up trying to filter by a field called "SoEmpNo", and promptly throws an exception because that doesn't exist. Is there a grid property we should be using to make it send the correct name back in the filter request, or something?</p>
<p>Â </p>
<p>Thank you!</p>
]]></description>
        	        	<pubDate>Sat, 07 Jun 2014 00:50:24 +0300</pubDate>
        </item>
</channel>
</rss>