<?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: Customize advanced search "odata" on specified column</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/customize-advanced-search-odata-on-specified-column</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/customize-advanced-search-odata-on-specified-column/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>kweles on Customize advanced search "odata" on specified column</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customize-advanced-search-odata-on-specified-column#p17142</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customize-advanced-search-odata-on-specified-column#p17142</guid>
        	        	<description><![CDATA[<blockquote>
<p>betty said:</p>
<p>I used jqgrid advanced search feature. The meaning of the default string in <strong>odata</strong> is not clear enough for some scientific data.</p>
<p>odata : [&#39;equal&#39;, &#39;not equal&#39;, &#39;less&#39;, &#39;less or equal&#39;,&#39;greater&#39;,&#39;greater or equal&#39;, ...]</p>
<p>So I like to customized some of the string, e.g. change &#39;less&#39; -&#62; &#39;lower&#39;, and &#39;greater&#39; to &#39;higher&#39;, <br />but the change will be on one column only.</p>
<p>I tried two ways so far, but have not got a solution.</p>
</p>
<p>Way 1: the odata will apply to all the columns in the grid.</p>
<p>jQuery().ready(function (){</p>
<p>$.extend($.jgrid.search,{Find:"Filter Results&#8230;", caption:"Filter Results&#8230;", odata:[...,&#39;lower&#39;, &#39;lower and equal&#39;, &#39;higher&#39;, ...]});</p>
<p>&#8230;</p>
<p>}</p>
</p>
<p>Way 2, only the sopt part works.</p>
<p>colModel:[</p>
<p>...</p>
<p>&#160;&#160;&#160; &#60;ww:elseif test="name == &#39;RESOLUTION&#39;"&#62;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; , searchoptions:{sopt:[&#39;eq&#39;,&#39;ne&#39;,&#39;lt&#39;,&#39;le&#39;,&#39;gt&#39;,&#39;ge&#39;], odata:[&#39;equal&#39;, &#39;not equal&#39;,&#39;lower&#39;, &#39;lower and equal&#39;, &#39;higher&#39;,&#39;higher and equal&#39;]}<br />&#160;&#160;&#160; &#60;/ww:elseif&#62;&#160;&#160;&#160;&#160; &#160;</p>
<p>&#8230;</p>
<p>]</p>
<p>Any help? Thanks a lot.</p>
</p>
</blockquote>
<hr />
<p>hi betty!</p>
</p>
<p>i am from brazil,&#160; i don&#180;t speak english, but i think that i understanded your problem:</p>
<p>Please, see this code:</p>
</p>
<p>&#60;head&#62;</p>
<p>&#60;script type="text/javascript"&#62;</p>
<p>&#160;&#160; &#160;function MudaLabbelGrid(){<br />&#160;&#160; &#160;&#160;&#160; &#160;$.jgrid.search = {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;caption: "Pesquisa Nota",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;Find: "Pesquisar",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;Reset: "Limpar",<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;odata : [&#39;Igual&#39;]<br />&#160;&#160; &#160;&#160;&#160; &#160;};</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;$.extend($.jgrid.search,{Find:&#39;Pesquisar&#39;});<br />&#160;&#160; &#160;}</p>
<p>&#60;/script&#62;</p>
<p>&#60;/head&#62;<br />&#60;body onload="MudaLabbelGrid()" &#62;</p>
<p>&#60;/body&#62;</p>
</p>
<p>i hope that help you!</p></p>
]]></description>
        	        	<pubDate>Thu, 13 May 2010 14:54:52 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Customize advanced search "odata" on specified column</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customize-advanced-search-odata-on-specified-column#p17091</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customize-advanced-search-odata-on-specified-column#p17091</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>The correct way is not to set the odata in the search options, but translate the whole array like this:</p>
<p>Suppose the odata has definition</p>
<p>odata : [&#39;equal&#39;, &#39;not equal&#39;, &#39;less&#39;, &#39;less or equal&#39;,&#39;greater&#39;,&#39;greater or equal&#39;, &#39;begins with&#39;,&#39;does not begin with&#39;,&#39;is in&#39;,&#39;is not in&#39;,&#39;ends with&#39;,&#39;does not end with&#39;,&#39;contains&#39;,&#39;does not contain&#39;],</p>
</p>
<p>then after loading jqgrid files</p>
<p>$.jgrid.odata = [&#39;...here your translations ]</p>
</p>
<p>I see this is not very good solution, but any way I should save the existing users.</p>
<p>Regards</p>
<p>Tony</p></p>
]]></description>
        	        	<pubDate>Wed, 12 May 2010 12:41:09 +0300</pubDate>
        </item>
        <item>
        	<title>betty on Customize advanced search "odata" on specified column</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customize-advanced-search-odata-on-specified-column#p16989</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customize-advanced-search-odata-on-specified-column#p16989</guid>
        	        	<description><![CDATA[<p>Thank you for the fixing. I tried with a new download of jqgrid version 3.6.5, which seems having the code fixing. But I still could not get my requirement worked.</p>
</p>
<p>Since I only want to customize the text in the drop down box for one column, could the code be something like,</p>
</p>
<p>colModel:[</p>
<p>...</p>
<p>&#160;&#160;&#160; &#60;ww:elseif test="name == &#39;RESOLUTION&#39;"&#62;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; , searchoptions:{sopt:[&#39;lt&#39;,&#39;le&#39;,&#39;gt&#39;,&#39;ge&#39;], odata:[&#39;lower&#39;, &#39;lower and equal&#39;, &#39;higher&#39;,&#39;higher and equal&#39;]}<br />&#160;&#160;&#160; &#60;/ww:elseif&#62;&#160;&#160;&#160;&#160; &#160;</p>
<p>&#8230;</p>
<p>]</p>
</p>
<p>I did not see error, but still the default odata was displayed for resolution column. Any part not right?</p>
</p>
<p>Thanks a lot!</p></p>
]]></description>
        	        	<pubDate>Thu, 06 May 2010 22:13:45 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Customize advanced search "odata" on specified column</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customize-advanced-search-odata-on-specified-column#p16887</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customize-advanced-search-odata-on-specified-column#p16887</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks. This is a bug. Fixed.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 04 May 2010 09:38:53 +0300</pubDate>
        </item>
        <item>
        	<title>betty on Customize advanced search "odata" on specified column</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customize-advanced-search-odata-on-specified-column#p16883</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customize-advanced-search-odata-on-specified-column#p16883</guid>
        	        	<description><![CDATA[</p>
<p>I used jqgrid advanced search feature. The meaning of the default string in <strong>odata</strong> is not clear enough for some scientific data.</p>
<p>odata : [&#39;equal&#39;, &#39;not equal&#39;, &#39;less&#39;, &#39;less or equal&#39;,&#39;greater&#39;,&#39;greater or equal&#39;, ...]</p>
<p>So I like to customized some of the string, e.g. change &#39;less&#39; -&#62; &#39;lower&#39;, and &#39;greater&#39; to &#39;higher&#39;, <br />but the change will be on one column only.</p>
<p>I tried two ways so far, but have not got a solution.</p>
</p>
<p>Way 1: the odata will apply to all the columns in the grid.</p>
<p>jQuery().ready(function (){</p>
<p>$.extend($.jgrid.search,{Find:"Filter Results&#8230;", caption:"Filter Results&#8230;", odata:[...,&#39;lower&#39;, &#39;lower and equal&#39;, &#39;higher&#39;, ...]});</p>
<p>&#8230;</p>
<p>}</p>
</p>
<p>Way 2, only the sopt part works.</p>
<p>colModel:[</p>
<p>...</p>
<p>&#160;&#160;&#160; &#60;ww:elseif test="name == &#39;RESOLUTION&#39;"&#62;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; , searchoptions:{sopt:[&#39;eq&#39;,&#39;ne&#39;,&#39;lt&#39;,&#39;le&#39;,&#39;gt&#39;,&#39;ge&#39;], odata:[&#39;equal&#39;, &#39;not equal&#39;,&#39;lower&#39;, &#39;lower and equal&#39;, &#39;higher&#39;,&#39;higher and equal&#39;]}<br />&#160;&#160;&#160; &#60;/ww:elseif&#62;&#160;&#160;&#160;&#160; &#160;</p>
<p>&#8230;</p>
<p>]</p>
<p>Any help? Thanks a lot.</p></p>
]]></description>
        	        	<pubDate>Tue, 04 May 2010 01:30:48 +0300</pubDate>
        </item>
</channel>
</rss>