<?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: Is Between SQL</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/is-between-sql</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/is-between-sql/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Andrius Ilgunas on Is Between SQL</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/is-between-sql#p26008</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/is-between-sql#p26008</guid>
        	        	<description><![CDATA[<p>Nevermind.&#160; I found Oleg&#39;s post (<a href="http://stackoverflow.com/questions/4973361/how-can-i-preserve-the-search-filters-in-jqgrid-on-page-reload/4977896#4977896" rel="nofollow" target="_blank"><a href="http://stackoverflow.com/quest" rel="nofollow">http://stackoverflow.com/quest</a>.....96#4977896</a>) that describes how to do this.&#160;</p>
</p>
<p>Basically, the idea is to break down the BETWEEN into two ANDs (eg.&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</p>
<p>case &#39;Custom&#39;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; fromDate = jQuery("#trDateFrom").val();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; toDate = jQuery("#trDateFrom").val();<br />&#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; myFilter += &#39;{"field":"c.added","op":"gt","data":"&#39;+fromDate+&#39;"}&#39;+&#39; {"field":"c.added","op":"lt","data":"&#39;+toDate+&#39;"}&#39;;</p>
</p>
<p>Thanks anyway! <img class="wp-smiley" src="/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
]]></description>
        	        	<pubDate>Sat, 25 Feb 2012 00:41:48 +0200</pubDate>
        </item>
        <item>
        	<title>Andrius Ilgunas on Is Between SQL</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/is-between-sql#p26007</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/is-between-sql#p26007</guid>
        	        	<description><![CDATA[</p>
<p>Hi All,</p>
</p>
<p>Thanks so very much for the work on jQgrid!&#160; It&#39;s an amazing piece of work!&#160;</p>
<p>And please direct me to a more appropriate form if this isn&#39;t the right one for my question.</p>
</p>
<p>I&#39;m attempting to pass a date range to the database query, and it doesn&#39;t seem that there&#39;s a BETWEEN &#8230; AND &#8230; functionality in the searchFilter.js file and Google isn&#39;t giving up that secret very easily.</p>
</p>
<p>I&#39;m using a custom form to build the filter string.</p>
</p>
<p>Here&#39;s a snippet of what I&#39;ve got going:</p>
<p>&#8211;8&#60;&#8212;-</p>
<p>&#8230;</p>
<p>case &#39;This Year&#39;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; myTimeframe = thisSec &#8211; (60 * 60 * 24 * 365); // 365 days ago<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; myFilter += &#39;{"field":"c.added","op":"gt","data":"&#39;+ myTimeframe + &#39;"},&#39;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; break;<br />case &#39;Custom&#39;:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; fromDate = jQuery("#trDateFrom").val();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; toDate = jQuery("#trDateTo").val();&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // What operator goes here?&#160; Does one exist?<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; myTimeframe = &#60;&#60;&#60;something&#62;&#62;&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; myFilter += &#39;{"field":"c.added","op":"&#60;&#60;&#60;???&#62;&#62;&#62;","data":"&#39;+ myTimeframe + &#39;"},&#39;;</p>
<p>&#8230;</p>
<p>jQuery.extend(grid[0].p.postData,{filters:myFilter});</p>
<p>grid.trigger("reloadGrid",[{page:1}]);</p>
<p>&#8211;8&#60;&#8212;-</p>
</p>
<p>Is this something that&#39;s in the works, or have I overlooked some documentation somewhere?&#160; If it makes a difference, I am using jQuery&#39;s datepicker plugin.</p>
</p>
<p>Thanks again for making this! You&#39;ve saved me a brazilion hours worth of work, and you guys are the BEST! <img class="wp-smiley" src="/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
]]></description>
        	        	<pubDate>Sat, 25 Feb 2012 00:30:47 +0200</pubDate>
        </item>
</channel>
</rss>