<?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: Search does not work in JqGrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/search-does-not-work-in-jqgrid</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/search-does-not-work-in-jqgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>yashmangupta on Search does not work in JqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/search-does-not-work-in-jqgrid#p24456</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/search-does-not-work-in-jqgrid#p24456</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>I am using the below function to pass the value selected by the User from the dropdown. I commented the 2nd line in the below code and replaced it with the code suggested by you but still no luck.</p>
<p>There is no search code in the ASP page which pulls the data from database as my assumption is that since the data is written in XML format, then the search will be table bound instead of searching db again.</p>
</p>
<p>The below line I have replaced it with&#160;$("#list").jqGrid(&#39;filterToolbar&#39;, { stringResult: true, searchOnEnter: true, defaultSearch:"cn" });</p>
<p>// this function is to show the searchboxes on top of the grid</p>
<p>jQuery("#list").jqGrid(&#39;filterToolbar&#39;,&#39;&#39;);</p>
</p>
<p>function gridReload()</p>
<p>{</p>
<p><span style="white-space:pre"> </span>var cd_mask = jQuery("#ProgramName").val();</p>
<p><span style="white-space:pre"> </span>jQuery("#list").jqGrid(&#39;setGridParam&#39;,{url:"fetchquestionsdata.asp?prid="+cd_mask+"&#38;q=1",page:1}).trigger("reloadGrid");</p>
<p>}</p>
</p>
<p>Appreciate your help <img class="spSmiley" style="margin:0" title="Smile" src="/blog/wp-content/forum-smileys/sf-smile.gif" alt="Smile" /></p>
]]></description>
        	        	<pubDate>Mon, 29 Aug 2011 20:45:59 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Search does not work in JqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/search-does-not-work-in-jqgrid#p24453</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/search-does-not-work-in-jqgrid#p24453</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Try this</p>
</p>
<p>function gridReload()</p>
<p>{</p>
<p>var cd_mask = jQuery("#ProgramName").val();</p>
<p>return "fetchquestionsdata.asp?prid="+cd_mask+"&#38;q=1&#8243;;</p>
<p>}</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Mon, 29 Aug 2011 18:39:41 +0300</pubDate>
        </item>
        <item>
        	<title>yashmangupta on Search does not work in JqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/search-does-not-work-in-jqgrid#p24436</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/search-does-not-work-in-jqgrid#p24436</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I am not able to perform the search activity in the jqGrid. Can someone guide on whether do I need to write a separate SQL query. Currently I am using the below code</p>
</p>
<p>$(function(){</p>
<p>$("#list").jqGrid({</p>
<p>url:gridReload(),</p>
<p>datatype: &#39;xml&#39;,</p>
<p>mtype: &#39;POST&#39;,</p>
<p>colNames:[&#39;ID&#39;,&#39;Visible&#39;, &#39;Question Title&#39;,&#39;Type&#39;,&#39;Question Hint&#39;,&#39;Answer&#39;,&#39;Explanation&#39;,&#39;File Type&#39;, &#39;File Name&#39;],</p>
<p>colModel :[</p>
<p>//{name: &#39;myac&#39;, width:50, fixed:true, sortable:false, resize:false, formatter:&#39;actions&#39;, formatoptions:{keys:true}},</p>
<p>{name:&#39;PK_QuestionTitleID&#39;, index:&#39;PK_QuestionTitleID&#39;, width:55, sortable:true, align:&#39;center&#39;},</p>
<p>{name:&#39;IsQuestionTitleActive&#39;, index:&#39;IsQuestionTitleActive&#39;, width:50, sortable:true, align:&#39;center&#39;},</p>
<p>{name:&#39;QuestionTitle&#39;, index:&#39;QuestionTitle&#39;, width:200, align:&#39;left&#39;, sortable:true},</p>
<p>{name:&#39;AnswerOptionType&#39;, index:&#39;AnswerOptionType&#39;, width:50, align:&#39;center&#39;, sortable:true},</p>
<p>{name:&#39;QuestionHint&#39;, index:&#39;QuestionHint&#39;, width:150, align:&#39;left&#39;},</p>
<p>{name:&#39;CorrectAnswers&#39;, index:&#39;CorrectAnswers&#39;, width:150, sortable:true},</p>
<p>{name:&#39;CorrectAnswerExplanation&#39;, index:&#39;CorrectAnswerExplanation&#39;, width:150, sortable:true},</p>
<p>{name:&#39;QuestionFileType&#39;, index:&#39;QuestionFileType&#39;, width:60, sortable:true, align:&#39;center&#39;},</p>
<p>{name:&#39;QuestionFileName&#39;, index:&#39;QuestionFileName&#39;, width:120, sortable:false, align:&#39;center&#39;}</p>
<p>],</p>
<p>rowNum:2,</p>
<p>rowList:[10,20,30],</p>
<p>pager: &#39;#pager&#39;,</p>
<p>sortname: &#39;PK_QuestionTitleID&#39;,</p>
<p>sortorder: &#39;asc&#39;,</p>
<p>viewrecords: true,</p>
<p>gridview: true,</p>
<p>caption: &#39;My First grid&#39;,</p>
<p>multiselect: false,</p>
<p>subgrid: true,</p>
<p>autowidth: true,</p>
<p>autosearch: true,</p>
<p>height: 300</p>
<p>}).navGrid(&#39;#pager&#39;,{edit:true,add:true,del:false, search:false})</p>
</p>
<p>// this function is to retrieve the value from the Grid</p>
<p>jQuery("#a1").click( function(){</p>
<p>var id = jQuery("#list").jqGrid(&#39;getGridParam&#39;,&#39;selrow&#39;);</p>
<p>if (id)	{</p>
<p>var ret = jQuery("#list").jqGrid(&#39;getRowData&#39;,id);</p>
<p>alert("id="+ret.PK_QuestionTitleID+" invdate="+escape(ret.QuestionTitle)+"...");</p>
<p>} else { alert("Please select row");}</p>
<p>});</p>
</p>
<p>// this function is to call search box</p>
<p>jQuery("#bsdata").click(function(){</p>
<p>jQuery("#list").jqGrid(&#39;searchGrid&#39;,</p>
<p>{sopt:[&#39;cn&#39;,&#39;bw&#39;,&#39;eq&#39;,&#39;ne&#39;,&#39;lt&#39;,&#39;gt&#39;,&#39;ew&#39;]}</p>
<p>);</p>
<p>});</p>
</p>
<p>// this function is to show the searchboxes on top of the grid</p>
<p>jQuery("#list").jqGrid(&#39;filterToolbar&#39;,&#39;&#39;);</p>
</p>
<p>});</p>
</p>
<p>function gridReload()</p>
<p>{</p>
<p>var cd_mask = jQuery("#ProgramName").val();</p>
<p>jQuery("#list").jqGrid(&#39;setGridParam&#39;,{url:"fetchquestionsdata.asp?prid="+cd_mask+"&#38;q=1",page:1}).trigger("reloadGrid");</p>
<p>}</p>
]]></description>
        	        	<pubDate>Sat, 27 Aug 2011 20:17:50 +0300</pubDate>
        </item>
</channel>
</rss>