<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: jqGrid Local Data Live Search</title>
	<atom:link href="http://langui.sh/2010/03/04/jqgrid-local-data-live-search/feed/" rel="self" type="application/rss+xml" />
	<link>http://langui.sh/2010/03/04/jqgrid-local-data-live-search/</link>
	<description>Fun hacks, WP plugins, photography, and PKI junk.  Languishing since 2008.</description>
	<lastBuildDate>Tue, 01 May 2012 19:02:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>	<item>
		<title>By: maparrar</title>
		<link>http://langui.sh/2010/03/04/jqgrid-local-data-live-search/comment-page-1/#comment-9863</link>
		<dc:creator>maparrar</dc:creator>
		<pubDate>Thu, 01 Mar 2012 11:50:51 +0000</pubDate>
		<guid isPermaLink="false">http://langui.sh/?p=986#comment-9863</guid>
		<description>Hi, thanks for the examples. I also made my version. This one allows you to select the columns you want to search.
[Hola, gracias por los ejemplos. Yo también hice mi versíon. Esta permite seleccionar las columnas en las que se quiere buscar.]


&lt;code&gt;
//Declare variables [Declara las variables]
        var grid=$(&quot;#list&quot;);
        var columns=new Array();
        //Create the grid [Crea la grilla]
        grid.jqGrid({
            datatype: &quot;xml&quot;,
            url:&quot;somFile.php&quot;,
            loadonce:true,
            rowNum:-1,
            colNames:[&#039;ID&#039;,&#039;Name&#039;,&#039;Description&#039;,&#039;Text&#039;],
            colModel:[
                {name:&#039;id&#039;,index:&#039;id&#039;,width:50},
                {name:&#039;name&#039;,index:&#039;name&#039;,width:50},
                {name:&#039;description&#039;,index:&#039;description&#039;,width:50},
                {name:&#039;text&#039;,index:&#039;text&#039;,width:50}
            ],
            loadComplete:function(){
                //Empty the columns Array [Borra el Array de columnas]
                columns=new Array();
                //Add the columns to search for [Agrega las columnas en las que se quiere buscar]
                columns.push(grid.jqGrid(&#039;getCol&#039;,&#039;name&#039;,true));
                columns.push(grid.jqGrid(&#039;getCol&#039;,&#039;description&#039;,true));
            }
        });
        
        //Define the keyup event [Define el evento keyup]        
        $(&quot;#gridsearch&quot;).keyup(function(){
            //Hide all rows and display only matching
            //[Oculta todas las filas y muestra solo las que coincidan con la búsqueda]
            grid.find(&quot;.jqgrow&quot;).hide();
            var searchString = $(this).val().toLowerCase();
            for(var i in columns){
                var column=columns[i];
                $.each(column,function(){
                    var value=this.value.toLowerCase();
                    if(value.indexOf(searchString) != -1){
                        $(&#039;#&#039;+this.id).show();
                    }
                });
            }
        });
        
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi, thanks for the examples. I also made my version. This one allows you to select the columns you want to search.<br />
[Hola, gracias por los ejemplos. Yo también hice mi versíon. Esta permite seleccionar las columnas en las que se quiere buscar.]</p>
<p><code><br />
//Declare variables [Declara las variables]<br />
        var grid=$("#list");<br />
        var columns=new Array();<br />
        //Create the grid [Crea la grilla]<br />
        grid.jqGrid({<br />
            datatype: "xml",<br />
            url:"somFile.php",<br />
            loadonce:true,<br />
            rowNum:-1,<br />
            colNames:['ID','Name','Description','Text'],<br />
            colModel:[<br />
                {name:'id',index:'id',width:50},<br />
                {name:'name',index:'name',width:50},<br />
                {name:'description',index:'description',width:50},<br />
                {name:'text',index:'text',width:50}<br />
            ],<br />
            loadComplete:function(){<br />
                //Empty the columns Array [Borra el Array de columnas]<br />
                columns=new Array();<br />
                //Add the columns to search for [Agrega las columnas en las que se quiere buscar]<br />
                columns.push(grid.jqGrid('getCol','name',true));<br />
                columns.push(grid.jqGrid('getCol','description',true));<br />
            }<br />
        });</p>
<p>        //Define the keyup event [Define el evento keyup]<br />
        $("#gridsearch").keyup(function(){<br />
            //Hide all rows and display only matching<br />
            //[Oculta todas las filas y muestra solo las que coincidan con la búsqueda]<br />
            grid.find(".jqgrow").hide();<br />
            var searchString = $(this).val().toLowerCase();<br />
            for(var i in columns){<br />
                var column=columns[i];<br />
                $.each(column,function(){<br />
                    var value=this.value.toLowerCase();<br />
                    if(value.indexOf(searchString) != -1){<br />
                        $('#'+this.id).show();<br />
                    }<br />
                });<br />
            }<br />
        });</p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlo</title>
		<link>http://langui.sh/2010/03/04/jqgrid-local-data-live-search/comment-page-1/#comment-7443</link>
		<dc:creator>Carlo</dc:creator>
		<pubDate>Sun, 14 Aug 2011 04:58:53 +0000</pubDate>
		<guid isPermaLink="false">http://langui.sh/?p=986#comment-7443</guid>
		<description>No tienes el ejemplo completo???
o al menos el codigo de data.php</description>
		<content:encoded><![CDATA[<p>No tienes el ejemplo completo???<br />
o al menos el codigo de data.php</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haktan</title>
		<link>http://langui.sh/2010/03/04/jqgrid-local-data-live-search/comment-page-1/#comment-7199</link>
		<dc:creator>Haktan</dc:creator>
		<pubDate>Mon, 04 Jul 2011 01:16:07 +0000</pubDate>
		<guid isPermaLink="false">http://langui.sh/?p=986#comment-7199</guid>
		<description>I further developed the Marcin&#039;s code: This one should work!

// Declare variables
var grid = $(“#list”);

//grid complete event
searchColumn =grid.jqGrid(&#039;getRowData&#039;); 
rowid2id =grid.jqGrid(&#039;getCol&#039;,&#039;name&#039;,true);

//search function
jQuery(&#039;#gridsearch&#039;).keyup(function () {
			var searchString = jQuery(this).val().toLowerCase()
				for (row=0; row&lt;searchColumn.length; row++){
					jQuery.each(searchColumn[row],function(key,value) {
						if(value.toLowerCase().indexOf(searchString) != -1) {
							jQuery(&#039;#&#039;+rowid2id[row].id).show()
							return false;
						}else{
							jQuery(&#039;#&#039;+rowid2id[row].id).hide()	
						}
					})
					
				}
		});</description>
		<content:encoded><![CDATA[<p>I further developed the Marcin&#8217;s code: This one should work!</p>
<p>// Declare variables<br />
var grid = $(“#list”);</p>
<p>//grid complete event<br />
searchColumn =grid.jqGrid(&#8216;getRowData&#8217;);<br />
rowid2id =grid.jqGrid(&#8216;getCol&#8217;,'name&#8217;,true);</p>
<p>//search function<br />
jQuery(&#8216;#gridsearch&#8217;).keyup(function () {<br />
			var searchString = jQuery(this).val().toLowerCase()<br />
				for (row=0; row&lt;searchColumn.length; row++){<br />
					jQuery.each(searchColumn[row],function(key,value) {<br />
						if(value.toLowerCase().indexOf(searchString) != -1) {<br />
							jQuery(&#039;#&#039;+rowid2id[row].id).show()<br />
							return false;<br />
						}else{<br />
							jQuery(&#039;#&#039;+rowid2id[row].id).hide()<br />
						}<br />
					})</p>
<p>				}<br />
		});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prakash</title>
		<link>http://langui.sh/2010/03/04/jqgrid-local-data-live-search/comment-page-1/#comment-6398</link>
		<dc:creator>Prakash</dc:creator>
		<pubDate>Fri, 04 Mar 2011 11:38:39 +0000</pubDate>
		<guid isPermaLink="false">http://langui.sh/?p=986#comment-6398</guid>
		<description>Will it work for multiple page.</description>
		<content:encoded><![CDATA[<p>Will it work for multiple page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wega</title>
		<link>http://langui.sh/2010/03/04/jqgrid-local-data-live-search/comment-page-1/#comment-6053</link>
		<dc:creator>wega</dc:creator>
		<pubDate>Tue, 28 Dec 2010 07:54:06 +0000</pubDate>
		<guid isPermaLink="false">http://langui.sh/?p=986#comment-6053</guid>
		<description>Small fix for code of Marcin if uses id column:
[code]
rowId = gridData[row][&#039;id&#039;];
if (rowMatch) {
    $(&#039;table#list&#039;).find(&#039;tr#&#039;+rowId).show();
} else {
    $(&#039;table#list&#039;).find(&#039;tr#&#039;+rowId).hide();
}
[/code]</description>
		<content:encoded><![CDATA[<p>Small fix for code of Marcin if uses id column:<br />
[code]<br />
rowId = gridData[row]['id'];<br />
if (rowMatch) {<br />
    $('table#list').find('tr#'+rowId).show();<br />
} else {<br />
    $('table#list').find('tr#'+rowId).hide();<br />
}<br />
[/code]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neeraj</title>
		<link>http://langui.sh/2010/03/04/jqgrid-local-data-live-search/comment-page-1/#comment-4053</link>
		<dc:creator>Neeraj</dc:creator>
		<pubDate>Fri, 12 Nov 2010 22:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://langui.sh/?p=986#comment-4053</guid>
		<description>Hi Thanks for sharing.. yep its working with all columns but the problem is its not searching across the pages. Working on that now ...</description>
		<content:encoded><![CDATA[<p>Hi Thanks for sharing.. yep its working with all columns but the problem is its not searching across the pages. Working on that now &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Erickson</title>
		<link>http://langui.sh/2010/03/04/jqgrid-local-data-live-search/comment-page-1/#comment-3823</link>
		<dc:creator>Mike Erickson</dc:creator>
		<pubDate>Tue, 21 Sep 2010 23:03:46 +0000</pubDate>
		<guid isPermaLink="false">http://langui.sh/?p=986#comment-3823</guid>
		<description>FWIW, in Marcin code, I can tell the query etc is working but the portion where it hide/show the row, I dont think the jQuery selector is correct.  My table construct is 


   
       
   
</description>
		<content:encoded><![CDATA[<p>FWIW, in Marcin code, I can tell the query etc is working but the portion where it hide/show the row, I dont think the jQuery selector is correct.  My table construct is </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Erickson</title>
		<link>http://langui.sh/2010/03/04/jqgrid-local-data-live-search/comment-page-1/#comment-3822</link>
		<dc:creator>Mike Erickson</dc:creator>
		<pubDate>Tue, 21 Sep 2010 23:00:47 +0000</pubDate>
		<guid isPermaLink="false">http://langui.sh/?p=986#comment-3822</guid>
		<description>Wow, this i nice little tip! When I first viewed the demo, I was like &quot;wow&quot; but immediately thought, how about searching all columns.   Then Marcin contributes, but alas I cant get his code to work.  Anybody have this working searching across all columns?</description>
		<content:encoded><![CDATA[<p>Wow, this i nice little tip! When I first viewed the demo, I was like &#8220;wow&#8221; but immediately thought, how about searching all columns.   Then Marcin contributes, but alas I cant get his code to work.  Anybody have this working searching across all columns?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Erickson</title>
		<link>http://langui.sh/2010/03/04/jqgrid-local-data-live-search/comment-page-1/#comment-3821</link>
		<dc:creator>Mike Erickson</dc:creator>
		<pubDate>Tue, 21 Sep 2010 21:42:46 +0000</pubDate>
		<guid isPermaLink="false">http://langui.sh/?p=986#comment-3821</guid>
		<description>Wow, this i nice little tip (and thanks Marcin for the contribution).   When I first viewed the demo, I was like &quot;wow&quot; but immediately thought, how about searching all columns.   Then Marcin contributes.</description>
		<content:encoded><![CDATA[<p>Wow, this i nice little tip (and thanks Marcin for the contribution).   When I first viewed the demo, I was like &#8220;wow&#8221; but immediately thought, how about searching all columns.   Then Marcin contributes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Esdras</title>
		<link>http://langui.sh/2010/03/04/jqgrid-local-data-live-search/comment-page-1/#comment-3804</link>
		<dc:creator>Esdras</dc:creator>
		<pubDate>Fri, 17 Sep 2010 16:15:45 +0000</pubDate>
		<guid isPermaLink="false">http://langui.sh/?p=986#comment-3804</guid>
		<description>Great Tip!!!
Thanks</description>
		<content:encoded><![CDATA[<p>Great Tip!!!<br />
Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached
Database Caching using memcached
Object Caching 468/469 objects using memcached

Served from: langui.sh @ 2012-05-17 10:01:36 -->
