<?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: searchFilter and version 3.6.1</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361</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/searchfilter-and-version-361/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>SimonL on searchFilter and version 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12530</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12530</guid>
        	        	<description><![CDATA[<p>Thanks Tony, all the columns that should be there now appear in the drop down. I shall now put my other code back and see if everything still works.</p>
</p>
<p>Thanks again,</p>
<p>Simon</p>
]]></description>
        	        	<pubDate>Fri, 27 Nov 2009 10:47:28 +0200</pubDate>
        </item>
        <item>
        	<title>tony on searchFilter and version 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12527</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12527</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>You should use searchoptions and set here searchhidden to true - i.e</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3351' value='Select Code' data-codeid='sfcode3351' /></p>
<div class='sfcode' id='sfcode3351'>
<p>searchoptions :{searchhidden:true}</p>
</div>
<p>This is due to correction of bug in 3.5.3.</p>
<p>For more information see here:</p>
<p><a href="http://github.com/tonytomov/jqGrid/commit/237d25abc43b81a509960d04a675bf5fb7295260" rel="nofollow" target="_blank"><a href="http://github.com/tonytomov/jq" rel="nofollow">http://github.com/tonytomov/jq</a>.....5fb7295260</a></p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 27 Nov 2009 10:08:52 +0200</pubDate>
        </item>
        <item>
        	<title>SimonL on searchFilter and version 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12526</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12526</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
</p>
<p>I tried your suggestion but I&#39;m still having trouble. I&#39;ve stripped down the definition of my grid to try and work out what the problem is. I can reproduce the problem behaviour every time.</p>
<p>Using my downloaded version of jquery.jqrid.min.js (3.5.3). If I select advanced search, then the drop down list of columns shows<strong> all</strong> the columns in the grid definintion. Issuing my search runs correctly and the correct rows are returned.</p>
</p>
<p>If I then simply substitute the 3.5.3 version of jquery.jqrid.min.js for the 3.6.1 version then when I choose advanced search the drop down list of columns only contains columns that are <strong>visible</strong> in the grid, not all the columns where search: true is set.</p>
</p>
<p>In both cases the search works correctly, and no errors are displayed in firebug.&#160;</p>
</p>
<p>Note:&#160;</p>
<p>jquery.jqrid.min.js (3.5.3) contains:</p>
<p>Modules: grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; jquery.searchFilter.js; grid.inlinedit.js; grid.celledit.js; jqModal.js; jqDnR.js; grid.subgrid.js; grid.treegrid.js; grid.import.js; JsonXml.js; grid.setcolumns.js; grid.postext.js; grid.tbltogrid.js;</p>
</p>
<p>jquery.jqrid.min.js (3.6.1) contains:</p>
<p>Modules: grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; jquery.searchFilter.js; grid.inlinedit.js; grid.celledit.js; jqModal.js; jqDnR.js; grid.subgrid.js; grid.treegrid.js; grid.import.js; JsonXml.js; grid.setcolumns.js; grid.postext.js; grid.tbltogrid.js; <strong>grid.jqueryui.js</strong>;</p>
</p>
<p>This is my grid definition:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#g_stock&#39;).jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;Primary Image&#39;, &#39;Id&#39;, &#39;Artist ID&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;MediumID&#39;, &#39;SourceID&#39;, &#39;StockOwnerID&#39;, &#39;ClientID&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;Artist&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;Description&#39;, &#39;Medium&#39;, &#39;Category&#39;, &#39;Source&#39;, &#39;Owner&#39;, &#39;Client&#39;,</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;Cost Price&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;Ticket Price&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;Sold Price&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;Sold&#39;,</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;Signed&#39;, &#39;Location&#39;, &#39;ArtistName&#39;, &#39;Artist Relevant Dates&#39;, &#39;Artist Biography&#39;<br />&#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;&#160;&#160; colModel: [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;jqPrimaryImage&#39;, search: false, sortable: false, hidden: false, index: &#39;jqPrimaryImage&#39;, width: 110, align: &#39;center&#39; },</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Id&#39;, search: false, sortable: false, hidden: true, index: &#39;Id&#39;, width: 40, align: &#39;left&#39; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;ArtistID&#39;, search: false, sortable: false, hidden: true, index: &#39;ArtistID&#39;, width: 40, align: &#39;left&#39; },</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;MediumID&#39;, search: false, sortable: false, hidden: true, index: &#39;MediumID&#39;, width: 40, align: &#39;left&#39; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;SourceID&#39;, search: false, sortable: false, hidden: true, index: &#39;SourceID&#39;, width: 40, align: &#39;left&#39; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;StockOwnerID&#39;, search: false, sortable: false, hidden: true, index: &#39;StockOwnerID&#39;, width: 40, align: &#39;left&#39; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;ClientID&#39;, search: false, sortable: false, hidden: true, index: &#39;ClientID&#39;, width: 40, align: &#39;left&#39; },</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;ArtistProperName&#39;, search: true, sortable: true, hidden: false, index: &#39;ArtistProperName&#39;, width: 80, align: &#39;left&#39;, stype: "text" },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Description&#39;, search: true, sortable: true, hidden: false, index: &#39;Description&#39;, width: 100, align: &#39;left&#39;, stype: "text" },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Medium&#39;, search: true, sortable: true, hidden: true, index: &#39;Medium&#39;, width: 40, align: &#39;left&#39;, stype: "text" },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Category&#39;, search: true, sortable: true, hidden: true, index: &#39;Category&#39;, width: 40, align: &#39;left&#39;, stype: "text" },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Source&#39;, search: true, sortable: true, hidden: true, index: &#39;Source&#39;, width: 60, align: &#39;left&#39;, stype: "text" },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;StockOwner&#39;, search: true, sortable: true, hidden: true, index: &#39;StockOwner&#39;, width: 60, align: &#39;left&#39;, stype: "text" },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Client&#39;, search: true, sortable: true, hidden: true, index: &#39;Client&#39;, width: 60, align: &#39;left&#39;, stype: "text" },</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;CostPrice&#39;, search: true, sortable: true, hidden: false, index: &#39;CostPrice&#39;, width: 40, align: &#39;right&#39;, stype: "text", formatter: &#39;currency&#39;, formatoptions: { thousandsSeparator: ","} },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;TicketPrice&#39;, search: true, sortable: true, hidden: false, index: &#39;TicketPrice&#39;, width: 40, align: &#39;right&#39;, stype: "text", formatter: &#39;currency&#39;, formatoptions: { thousandsSeparator: ","} },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;SoldPrice&#39;, search: true, sortable: true, hidden: false, index: &#39;SoldPrice&#39;, width: 40, align: &#39;right&#39;, stype: "text", formatter: &#39;currency&#39;, formatoptions: { thousandsSeparator: ","} },</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Sold&#39;, search: true, sortable: true, hidden: false, index: &#39;Sold&#39;, width: 35, align: &#39;center&#39;, stype: "bool", formatter: &#39;checkbox&#39; },</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Signed&#39;, search: true, sortable: true, hidden: true, index: &#39;Signed&#39;, width: 35, align: &#39;center&#39;, stype: "bool", formatter: &#39;checkbox&#39; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Location&#39;, search: true, sortable: true, hidden: true, index: &#39;Location&#39;, width: 40, align: &#39;left&#39;, stype: "text" },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;ArtistName&#39;, search: false, sortable: false, hidden: true, index: &#39;ArtistName&#39;, width: 40, align: &#39;left&#39; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;ArtistDates&#39;, search: false, sortable: false, hidden: true, index: &#39;ArtistDates&#39;, width: 40, align: &#39;left&#39; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Artist Biography&#39;, search: true, sortable: false, hidden: true, index: &#39;Comments&#39;, width: 40, align: &#39;left&#39;, stype: "text" }</p>
<p>&#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;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: &#39;/Admin/Stock/GetListData/&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; autowidth: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: "#pager",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum: 5,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowList: [],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;ArtistName&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder: "asc",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: "Stock",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; footerrow: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; userDataOnFooter: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;json&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; height: &#39;auto&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; imgpath: &#39;/Scripts/themes/ui-darkness/images&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jsonReader: {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; root: "Rows",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; page: "Page",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; total: "Total",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; records: "Records",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; repeatitems: false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; userdata: "UserData",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; id: "Id"<br />&#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;&#160;&#160;&#160;&#160;&#160;&#160; loadui: "block",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; mtype: &#39;GET&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum: 10,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowList: [],<br />&#160;&#160;&#160;&#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;&#160;&#160;&#160; toolbar: [true, "top"]<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }).navGrid(<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "#pager",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; refresh: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; edit: false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; add: false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; del: false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; search: true<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {}, // edit options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {}, // add options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {}, // del options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; // search options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; multipleSearch: true<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160; );</p>
</p>
<p>Your help is much appreciated.</p>
</p>
<p>Regards,</p>
<p>Simon</p>
]]></description>
        	        	<pubDate>Fri, 27 Nov 2009 09:39:58 +0200</pubDate>
        </item>
        <item>
        	<title>tony on searchFilter and version 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12511</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12511</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I recommend you first to remove the RepopulateSearchFilter in afterShowSearch event</p>
<p>If everthing is ok then the error is in your function - use firebug to see where it is.</p>
<p>For me removing this function everthing is ok.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 27 Nov 2009 04:37:30 +0200</pubDate>
        </item>
        <item>
        	<title>SimonL on searchFilter and version 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12450</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12450</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
</p>
<p>Sorry I should have posted the code previously - difficult to help me if you can&#39;t see what I&#39;m doing.</p>
<p>This is the code:</p>
</p>
<p>&#160;&#160; &#60;script type="text/javascript"&#62;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; InitializeGrid("g_owner","/Admin/StockOwner")</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(function() {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(gridSelector).jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: baseURL + &#39;/GetListData/&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editURL: baseURL + &#39;/Edit/&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; deleteURL: baseURL + &#39;/Delete/&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; primaryKey: &#39;OwnerID&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#39;json&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; mtype: &#39;GET&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;&#39;, &#39;&#39;, // Edit, Delete<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;ID&#39;, &#39;Description&#39;<br />&#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;&#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; { name: &#39;editLink&#39;, fixed: true, resizable: false, search: false, sortable: false, hidden: false, index: &#39;editLink&#39;, width: 30, align: &#39;center&#39;, formatter: &#39;editButtonFormatter&#39; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;delButton&#39;, fixed: true, resizable: false, search: false, sortable: false, hidden: false, index: &#39;delButton&#39;, width: 60, align: &#39;center&#39;, formatter: &#39;deleteButtonFormatter&#39; },</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;OwnerID&#39;, search: false, hidden: true, index: &#39;OwnerID&#39;, width: 25, align: &#39;left&#39; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Description&#39;, search: true, sortable: true, hidden: false, index: &#39;Description&#39;, width: 100, align: &#39;left&#39;, stype: "text" }</p>
<p>&#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;&#160;&#160;&#160;&#160;&#160;&#160; autowidth: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: "pager",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;Description&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder: "asc",<br />&#160;&#160;&#160;&#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;&#160;&#160;&#160; imgpath: &#39;/scripts/themes/ui-darkness/images&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: "Stock Owners"</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }).navGrid("pager", { refresh: true, edit: false, add: false, del: false, search: true },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {}, // edit options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {}, // add options <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {}, // del options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; multipleSearch: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; afterShowSearch: RepopulateSearchFilter<br />} // search options<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; );</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; GridFilterSetup();</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</p>
<p>&#60;/script&#62;</p>
</p>
<p>You may see some strange function names there, these are helper functions that I have defined in another file. This post will become quite long now but I&#39;ll post the rest of my code here in case you need it.</p>
</p>
<p>var postData = null;<br />var gridID = null;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />var gridSelector = null;<br />var baseURL=null;</p>
<p>function InitializeGrid(_Grid_ID, _baseURL) {<br />&#160;&#160;&#160; gridID = _Grid_ID;<br />&#160;&#160;&#160; baseURL = _baseURL;<br />&#160;&#160;&#160; gridSelector = "#" + gridID;<br />}</p>
<p>function GridFilterSetup() {</p>
<p>&#160;&#160;&#160; // Pass the search filter a function to clear the current search state&#160;&#160;&#160; <br />&#160;&#160;&#160; $("#fbox_" + gridID).searchFilter().SetOnBeforeReset(ClearCurrentSearchState);</p>
<p>&#160;&#160;&#160; // Display an image/button on the grid toolbar indicating that a filter is in place. <br />&#160;&#160;&#160; // Thus allowing user to click and remove the filter<br />&#160;&#160;&#160; $("#t_" + gridID).append("&#60;input type=&#39;image&#39; src=&#39;/Admin/Content/Images/filter.png&#39; id=&#39;btnRemoveImageFilter&#39; name=&#39;RemoveImageFilter&#39; /&#62;");</p>
<p>&#160;&#160;&#160; $("#btnRemoveImageFilter").click(function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ClearCurrentSearchState();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(gridSelector).trigger("reloadGrid");<br />&#160;&#160;&#160; });</p>
<p>&#160;&#160;&#160; // Initially check if the filter image/button should be visible or not <br />&#160;&#160;&#160; SetFilterImageVisibility($(gridSelector));</p>
<p>}</p>
<p>function datePick(elem) {<br />&#160;&#160;&#160; jQuery(elem).datepicker({ dateFormat: &#39;dd/mm/yy&#39; });<br />}</p>
<p>function RepopulateSearchFilter() {</p>
<p>&#160;&#160;&#160; // If no criteria has been set, don&#39;t do anything more<br />&#160;&#160;&#160; if (!hasFilter($(gridSelector))) return;</p>
<p>&#160;&#160;&#160; postData = $(gridSelector).getGridParam(&#39;postData&#39;);</p>
<p>&#160;&#160;&#160; var ui = $("#fbox_" + gridID);</p>
<p>&#160;&#160;&#160; // Remove existing filters<br />&#160;&#160;&#160; ui.find(".ui-del").click(); // removes all filters, resets the last one<br />&#160;&#160;&#160; ui.find("select[name=&#39;groupOp&#39;]")[0].selectedIndex = 0; // changes the op back to the default one</p>
<p>&#160;&#160;&#160; try {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Convert filters string to JSON object<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var jFilters = JSON.parse(postData.filters);</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Add a row in the UI for each stored filter<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; for (var i = 0; i &#60;= jFilters.rules.length - 1; i++) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var rule = jFilters.rules[i];</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ui.find("select[name=&#39;field&#39;]")[i].value = rule.field;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // ui.find("select[name=&#39;field&#39;]")[i].selectedIndex = i;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ui.find("select[name=&#39;op&#39;]")[i].value = rule.op;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ui.find("input[class*=&#39;vdata&#39;]")[i].value = rule.data;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (i &#60; jFilters.rules.length - 1)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ui.searchFilter().add();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; // Set the All/Any filter<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ui.find("select[name=&#39;groupOp&#39;]")[0].value = jFilters.groupOp;</p>
<p>&#160;&#160;&#160; }<br />&#160;&#160;&#160; catch (Error) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; alert(Error);<br />&#160;&#160;&#160; }</p>
<p>}</p>
<p>function dateFormatter(cellvalue, options, rowObject) {</p>
<p>&#160;&#160;&#160; if (cellvalue == null) return &#39;&#39;;</p>
<p>&#160;&#160;&#160; // cellvalue is in the following format&#160; /Date(1146006000000)/<br />&#160;&#160;&#160; // we need to remove the forward slashes&#160;&#160;&#160; .<br />&#160;&#160;&#160; var datePart = cellvalue.toString().replace(/\\//g, "");<br />&#160;&#160;&#160; var dateValue = &#39;new &#39; + datePart + &#39;.toLocaleDateString()&#39;<br />&#160;&#160;&#160; return eval(dateValue);<br />}</p>
<p>function preGridDataRequest() {</p>
<p>&#160;&#160;&#160; // if(this.postData._search == true)<br />&#160;&#160;&#160; postData = $(gridSelector).getGridParam(&#39;postData&#39;)<br />&#160;&#160;&#160; if (postData.filters != undefined &#38;&#38; postData.filters != "")<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; writeSearchCookies(gridID);<br />&#160;&#160;&#160; else<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; readSearchCookies(gridID, postData);</p>
<p>&#160;&#160;&#160; SetFilterImageVisibility($(gridSelector));<br />}</p>
<p>function pagingEvent() {</p>
<p>&#160;&#160;&#160; var requestedPage = $(gridSelector).getGridParam(&#39;page&#39;);<br />&#160;&#160;&#160; var lastPage = $(gridSelector).getGridParam(&#39;lastpage&#39;);</p>
<p>&#160;&#160;&#160; // if the requested page is less than the last page value<br />&#160;&#160;&#160; if (parseInt(requestedPage) &#60;= parseInt(lastPage)) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(gridSelector).setGridParam({ page: parseInt(requestedPage) });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(gridSelector).setGridParam({ postData: { page: parseInt(requestedPage)} });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; writeSearchCookies(gridID);<br />&#160;&#160;&#160; }<br />}</p>
<p>function sortEvent(index, iCol, sortorder) {</p>
<p>&#160;&#160;&#160; $(gridSelector).setGridParam({ postData: { sidx: index, sord: sortorder} });<br />&#160;&#160;&#160; writeSearchCookies(gridID);<br />}</p>
<p>function hasFilter(grid) {</p>
<p>&#160;&#160;&#160; postData = grid.getGridParam(&#39;postData&#39;);<br />&#160;&#160;&#160; var hasFilter = postData.filters != undefined &#38;&#38; postData.filters != "";</p>
<p>&#160;&#160;&#160; return hasFilter;<br />}</p>
<p>function SetFilterImageVisibility(grid) {</p>
<p>&#160;&#160;&#160; if (hasFilter(grid)) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#btnRemoveImageFilter").show();<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; else {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#btnRemoveImageFilter").hide();<br />&#160;&#160;&#160; }</p>
<p>}</p>
<p>function ClearSearchCookies(grid) {</p>
<p>&#160;&#160;&#160; eraseCookie(grid + &#39;_search&#39;);<br />&#160;&#160;&#160; eraseCookie(grid + &#39;_page&#39;);<br />&#160;&#160;&#160; eraseCookie(grid + &#39;_rows&#39;);<br />&#160;&#160;&#160; eraseCookie(grid + &#39;_sidx&#39;);<br />&#160;&#160;&#160; eraseCookie(grid + &#39;_sord&#39;);<br />&#160;&#160;&#160; eraseCookie(grid + &#39;_filters&#39;);<br />}</p>
<p>function eraseCookie(name) {<br />&#160;&#160;&#160; createCookie(name, "", -1);<br />}</p>
<p>function writeSearchCookies(grid) {</p>
<p>&#160;&#160;&#160; postData = $(gridSelector).getGridParam(&#39;postData&#39;);</p>
<p>&#160;&#160;&#160; createCookie(grid + &#39;_search&#39;, postData._search, 0);<br />&#160;&#160;&#160; createCookie(grid + &#39;_page&#39;, postData.page, 0);<br />&#160;&#160;&#160; createCookie(grid + &#39;_rows&#39;, postData.rows, 0);<br />&#160;&#160;&#160; createCookie(grid + &#39;_sidx&#39;, postData.sidx, 0);<br />&#160;&#160;&#160; createCookie(grid + &#39;_sord&#39;, postData.sord, 0);<br />&#160;&#160;&#160; createCookie(grid + &#39;_filters&#39;, postData.filters, 0);</p>
<p>}</p>
<p>function readSearchCookies(grid, data) {</p>
<p>&#160;&#160;&#160; var search = readCookie(grid + &#39;_search&#39;);<br />&#160;&#160;&#160; if (search) {</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; data._search = true;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; data.page = parseInt(readCookie(grid + &#39;_page&#39;));<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; data.rows = parseInt(readCookie(grid + &#39;_rows&#39;));<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; data.sidx = readCookie(grid + &#39;_sidx&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; data.sord = readCookie(grid + &#39;_sord&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; data.filters = readCookie(grid + &#39;_filters&#39;);<br />&#160;&#160;&#160; }</p>
<p>}</p>
<p>function ClearCurrentSearchState() {</p>
<p>&#160;&#160;&#160; ClearSearchCookies(gridID);</p>
<p>&#160;&#160;&#160; $(gridSelector).setGridParam({ page: 1 });<br />&#160;&#160;&#160; $(gridSelector).setGridParam({ postData: { search: false, filters: ""} });</p>
<p>&#160;&#160;&#160; var ui = $("#fbox_" + gridID);</p>
<p>&#160;&#160;&#160; // Remove existing filters<br />&#160;&#160;&#160; ui.find(".ui-del").click();</p>
<p>}</p>
<p>function SaveClientState() {</p>
<p>&#160;&#160;&#160; postData = $(gridSelector).getGridParam(&#39;postData&#39;);</p>
<p>&#160;&#160;&#160; createCookie(&#39;search&#39;, postData._search, 0);<br />&#160;&#160;&#160; createCookie(&#39;page&#39;, postData.page, 0);<br />&#160;&#160;&#160; createCookie(&#39;rows&#39;, postData.rows, 0);<br />&#160;&#160;&#160; createCookie(&#39;sidx&#39;, postData.sidx, 0);<br />&#160;&#160;&#160; createCookie(&#39;sord&#39;, postData.sord, 0);<br />&#160;&#160;&#160; createCookie(&#39;filters&#39;, postData.filters, 0);</p>
<p>&#160;&#160;&#160; var search = readCookie(&#39;search&#39;);<br />&#160;&#160;&#160; alert(search);</p>
<p>&#160;&#160;&#160; var filters = readCookie(&#39;filters&#39;);<br />&#160;&#160;&#160; alert(filters);</p>
<p>&#160;&#160;&#160; return false;<br />}</p>
<p>///////////////////////////////////////////////////////////////////////<br />// Cookie utility functions<br />///////////////////////////////////////////////////////////////////////</p>
<p>function createCookie(name, value, days) {<br />&#160;&#160;&#160; if (days) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var date = new Date();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var expires = "; expires=" + date.toGMTString();<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; else var expires = "";<br />&#160;&#160;&#160; document.cookie = name + "=" + value + expires + "; path=/";<br />}</p>
<p>function readCookie(name) {<br />&#160;&#160;&#160; var nameEQ = name + "=";<br />&#160;&#160;&#160; var ca = document.cookie.split(&#39;;&#39;);<br />&#160;&#160;&#160; for (var i = 0; i &#60; ca.length; i++) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var c = ca[i];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; while (c.charAt(0) == &#39; &#39;) c = c.substring(1, c.length);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; return null;<br />}</p>
<p>function eraseCookie(name) {<br />&#160;&#160;&#160; createCookie(name, "", -1);<br />}</p>
<p>///////////////////////////////////////////////////////////////////<br />// Common formatter functions<br />///////////////////////////////////////////////////////////////////</p>
<p>function getPrimaryKey(rowObject) {</p>
<p>&#160;&#160;&#160; var pkColumn = $(gridSelector).getGridParam(&#39;primaryKey&#39;)<br />&#160;&#160;&#160; var pk = rowObject[pkColumn];<br />&#160;&#160;&#160; return pk.toString();</p>
<p>}</p>
</p>
<p>Regards,</p>
<p>Simon</p></p>
]]></description>
        	        	<pubDate>Wed, 25 Nov 2009 13:11:33 +0200</pubDate>
        </item>
        <item>
        	<title>tony on searchFilter and version 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12446</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12446</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Could you please post your code or better - give me a link to the problem?</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 25 Nov 2009 12:23:29 +0200</pubDate>
        </item>
        <item>
        	<title>SimonL on searchFilter and version 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12395</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/searchfilter-and-version-361#p12395</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
</p>
<p>I download version 3.6.1 because you kindly fixed a couple of bugs I was having. I now seem to be having a couple of issues around the searchFilter plugin. When I bring up the UI to enter search criteria it only allows me to choose from the columns that actually appear in the grid. There are a lot more defined in the colModel and in version 3.5.3 I could see all th coulms that searchable: true.</p>
<p>Also when the ajax request is sent to the server, I&#39;m getting &#39;undefined&#39; where the column name should be (in the filters parameter).</p>
</p>
<p>As I said, I downloaded 3.6.1 and copied the the files from the src folder to my project and the problem I describred above started to happen. I went back and downloaded 3.5.3 and copied the source files to my project and everything was ok again. I notice in the docs/change log that you have been doing some bug fixing in this area.</p>
<p>Am I doing something wrong?</p>
</p>
<p>Regards,</p>
<p>Simon</p>
]]></description>
        	        	<pubDate>Tue, 24 Nov 2009 11:59:24 +0200</pubDate>
        </item>
</channel>
</rss>