<?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: customized search option descriptions</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/customized-search-option-descriptions</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/feature-request/customized-search-option-descriptions/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on customized search option descriptions</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/customized-search-option-descriptions#p28607</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/customized-search-option-descriptions#p28607</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Thank you for the recommendation and code provided. I will look this to be added in the next releases.</p>
<p>Thank you</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 08 Apr 2013 12:47:48 +0300</pubDate>
        </item>
        <item>
        	<title>younger on customized search option descriptions</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/customized-search-option-descriptions#p28597</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/customized-search-option-descriptions#p28597</guid>
        	        	<description><![CDATA[<p>Since no one said not to, here is the patch file for grid.filter.js.&#160; It&#39;s a minor tweak, only 13 lines but it enables the functionality described, hopefuly some variant of it could make it into the code stream.&#160; If you save the following as grid.filter.patch, you can apply it to the grid.filter.js code from <a href="https://github.com/tonytomov/jqGrid/tree/master/js" rel="nofollow" target="_blank">https://github.com/tonytomov/jqGrid/tree/master/js</a> on linux via: # patch grid.filter.js &#60; grid.filter.patch</p>
<p>If you have the distribution as a whole unit, you&#39;ll need to make the changes manually.</p>
</p>
<p>------------------------------------ grid.filter.patch below ---------------------------------------</p>
</p>
<p>--- grid.filter.js&#160;&#160; &#160;2013-04-03 14:20:20.169886542 -0700<br />+++ gridsod.filter.js&#160;&#160; &#160;2013-04-03 14:20:20.184888806 -0700<br />@@ -53,6 +53,7 @@<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;errorcheck : true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;showQuery : true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;sopt : null,<br />+&#160;&#160; &#160;&#160;&#160; &#160;soptDesc : null,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;ops : [<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{"name": "eq", "description": "equal", "operator":"="},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{"name": "ne", "description": "not equal", "operator":"&#60;&#62;"},<br />@@ -396,7 +397,11 @@<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(so===0) {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;rule.op = that.p.ops[ina].name;<br />&#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;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;s += "&#60;option value=&#39;"+that.p.ops[ina].name+"&#39;&#62;"+that.p.ops[ina].description+"&#60;/option&#62;";<br />+&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if (cm.searchoptions.soptDesc &#38;&#38; cm.searchoptions.soptDesc[that.p.ops[ina].name] != undefined) {<br />+&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;s += "&#60;option value=&#39;"+that.p.ops[ina].name+"&#39;" +selected+"&#62;"+cm.searchoptions.soptDesc[that.p.ops[ina].name]+"&#60;/option&#62;";<br />+&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;} else {<br />+&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;s += "&#60;option value=&#39;"+that.p.ops[ina].name+"&#39;&#62;"+that.p.ops[ina].description+"&#60;/option&#62;";<br />+&#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; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;so++;<br />&#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;}<br />@@ -492,7 +497,11 @@<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;ina = $.inArray(op[i],aoprs);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(ina !== -1) {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;selected = rule.op === that.p.ops[ina].name ? " selected=&#39;selected&#39;" : "";<br />-&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;str += "&#60;option value=&#39;"+that.p.ops[ina].name+"&#39;"+selected+"&#62;"+that.p.ops[ina].description+"&#60;/option&#62;";<br />+&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if (cm.searchoptions.soptDesc &#38;&#38; cm.searchoptions.soptDesc[this.p.ops[ina].name] != undefined) {<br />+&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;str += "&#60;option value=&#39;"+that.p.ops[ina].name+"&#39;" +selected+"&#62;"+cm.searchoptions.soptDesc[this.p.ops[ina].name]+"&#60;/option&#62;";<br />+&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;} else {<br />+&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;str += "&#60;option value=&#39;"+that.p.ops[ina].name+"&#39;"+selected+"&#62;"+that.p.ops[ina].description+"&#60;/option&#62;";<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;}<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;ruleOperatorSelect.append( str );</p>
]]></description>
        	        	<pubDate>Fri, 05 Apr 2013 21:01:22 +0300</pubDate>
        </item>
        <item>
        	<title>younger on customized search option descriptions</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/customized-search-option-descriptions#p28577</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/customized-search-option-descriptions#p28577</guid>
        	        	<description><![CDATA[<p>First, I want to say thanks for making such a great grid component open source, jqgrid is an awesome tool.</p>
</p>
<p>So I&#39;ve searched google and this forum and haven&#39;t found an exact solution for this using jqGrid, but I&#39;ve found similar questions.</p>
<p>(The closest I found was: <a href="http://stackoverflow.com/questions/6230277/can-i-customize-text-on-jqgrid-search-options-on-per-column-basis" rel="nofollow" target="_blank"><a href="http://stackoverflow.com/quest" rel="nofollow">http://stackoverflow.com/quest</a>.....lumn-basis</a> )</p>
<p>Basically I have a column model with customized searchoptions for a start date field.</p>
<p>colModel:[</p>
<p>{name:&#39;User&#39;,index:&#39;user.name&#39;, width:100}, <br />{name:&#39;StartDate&#39;,index:&#39;user.start_date&#39;, width:55, formatter: doDateFormat, <br />&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; searchoptions:{<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;&#160;&#160;&#160;&#160; sopt: [&#39;eq&#39;, &#39;gt&#39;, &#39;lt&#39;],<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;&#160;&#160;&#160;&#160; dataInit:function(el){<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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(el).datepicker({dateFormat:&#39;dd M yy&#39;}).change(function(){$("#userlist")[0].triggerToolbar();});<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;&#160;&#160;&#160;&#160; } <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; }<br />&#160; }</p>
<p>]</p>
</p>
<p>When I use the custom search dialog, I want the filter for StartDate to have custom labels for the operators "equal", "greater", and "less".&#160; Since the field is a date, I&#39;d like to use "On", "After", and "Before".&#160; I realize that these labels come from the jqGrid-local-en.js file, but changing it there would affect all of the fields including the "User" field and I don&#39;t want to modify these values globally.</p>
</p>
<p>Ideally I&#39;d like to specify:</p>
<p>colModel:[</p>
<p>{name:&#39;User&#39;,index:&#39;user.name&#39;, width:100}, <br />{name:&#39;StartDate&#39;,index:&#39;user.start_date&#39;, width:55, formatter: doDateFormat, <br />&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; searchoptions:{<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;&#160;&#160;&#160;&#160; sopt: [&#39;eq&#39;, &#39;gt&#39;, &#39;lt&#39;],</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; soptDesc: {eq:&#39;On&#39;, gt:&#39;After&#39;, lt:&#39;Before&#39;},<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;&#160;&#160;&#160;&#160; dataInit:function(el){<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;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(el).datepicker({dateFormat:&#39;dd M  yy&#39;}).change(function(){$("#userlist")[0].triggerToolbar();});<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;&#160;&#160;&#160;&#160; } <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; }<br />&#160; }</p>
<p>]</p>
<p>And have only the StartDate filter operator values show up as "On/After/Before", leaving the User filter operator as "equal".</p>
</p>
<p>If there is an obvious way to make this work that I&#39;m missing, forgive me for making this request. Otherwise, I&#39;ve found a way to make this work by making a few minor changes to the grid.filter.js which I could provide if that&#39;s appropriate.</p>
<p>Thanks,</p>
<p>Jay</p></p>
]]></description>
        	        	<pubDate>Thu, 04 Apr 2013 00:32:58 +0300</pubDate>
        </item>
</channel>
</rss>