<?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: Need help searching on initial grid load</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/need-help-searching-on-initial-grid-load</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/need-help-searching-on-initial-grid-load/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Romanp on Need help searching on initial grid load</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/need-help-searching-on-initial-grid-load#p17759</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/need-help-searching-on-initial-grid-load#p17759</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
</p>
<p>Thanks for the prompt reply, but I think I explained myself badly. &#160; I don&#39;t want to use the search dialog, but want to drive all search parameters from the values in a select box. &#160; I found in the end that I can set the &#39;search&#39; grid parameter and add a value for the &#39;Status&#39; field (see bold text below). By doing this I can get the grid to load only the data I want by default and then the user can use the dropdown list to refine what they see later.&#160; Let me know if doing this is not supported or likely to break in future versions.</p>
<p>Thanks again,</p>
<p>Roman</p>
</p>
<p>&#160;grid.jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [&#39;Transaction Number&#39;, &#39;Status&#39;, &#39;Created By&#39;, &#39;Created On&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel: [{ name: &#39;TransactionNumber&#39;, index: &#39;TransactionNumber&#39;, width: 200 },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;Status&#39;, index: &#39;Status&#39;, width: 100 },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;CreatedBy&#39;, index: &#39;CreatedBy&#39;, width: 250 },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name: &#39;CreatedOn&#39;, index: &#39;CreatedOn&#39;, width: 175 },<br />&#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; pager: pager,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;CreatedOn&#39;,<br />&#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; rowList: [10, 20, 50],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder: "desc",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: "/Portal/Queue/Transactions",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; filterToolbar: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ondblClickRow: ShowTransactionDetails,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong>search: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; postData: { Status: &#39;CreatedOn &#62; 5/1/2010 AND Status == InProgress&#39; }</strong><br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; grid.jqGrid(&#39;navGrid&#39;, &#39;#pager&#39;, { edit: false,<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;&#160;&#160;&#160;&#160;&#160;&#160; add: false,<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;&#160;&#160;&#160;&#160;&#160;&#160; del: false,<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;&#160;&#160;&#160;&#160;&#160;&#160; search: false,<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;&#160;&#160;&#160;&#160;&#160;&#160; refreshstate: "current"<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;&#160;&#160;&#160;&#160; }),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; search.jqGrid(&#39;filterGrid&#39;, "#grid", {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; gridModel: false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; autosearch: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; filterModel: [{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; label: &#39;Order Status:&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; name: &#39;Status&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; stype: &#39;select&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; defval: &#39;InProgress&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; surl: &#39;/Portal/Queue/SearchFilter&#39;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }]<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; })<br />&#160;&#160;&#160;&#160;&#160;&#160; }</p>
]]></description>
        	        	<pubDate>Fri, 04 Jun 2010 21:24:18 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Need help searching on initial grid load</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/need-help-searching-on-initial-grid-load#p17749</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/need-help-searching-on-initial-grid-load#p17749</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Maybe it depends where you call the search dialog.</p>
<p>Also this should work:</p>
</p>
<p>$("#grid").jqGrid({</p>
<p>...</p>
<p>});</p>
<p>$("#grid").jqGrid(&#39;searchGrid&#39;);</p>
</p>
<p>If you call the last code somehere when the grid is not already constructed you can use setTimeout function</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 04 Jun 2010 19:18:55 +0300</pubDate>
        </item>
        <item>
        	<title>Romanp on Need help searching on initial grid load</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/need-help-searching-on-initial-grid-load#p17718</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/need-help-searching-on-initial-grid-load#p17718</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>I&#39;m using version 3.6.5 and the new API, and can&#39;t seem to figure out how to get the grid to apply the defval parameter when it first loads.&#160; I am using an external select list and filtermodel (which work great), but can&#39;t figure out how to trigger a search on initial load.&#160; If I set a breakpoint in Firebug, it all works well, but without the breakpoint, nothing happens.</p>
<p>I guess I&#39;m looking for 2 things:&#160;</p>
<p>Explanation of why it works with the breakpoint and not without</p>
<p>A workaround to trigger the search on initial load.</p>
</p>
<p>Roman</p>
]]></description>
        	        	<pubDate>Thu, 03 Jun 2010 20:39:53 +0300</pubDate>
        </item>
</channel>
</rss>