<?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: Multiselect Features</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/multiselect-features</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/multiselect-features/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>bdensmore on Multiselect Features</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/multiselect-features#p15370</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/multiselect-features#p15370</guid>
        	        	<description><![CDATA[<div>
<p>I&#39;ve made some headway with this in getting single select to work as well as using the ctr + Click working. I would like to know of better solutions if others have them, or even if there is something I&#39;ve missed that is built into jqGrid.</p>
</p>
<p>Anyway here is what I&#39;m doing. &#160;I&#39;m using the gridComplete event and having it run a function called getTable Rows. Here is the code I&#39;ve written.</p>
</p>
<p>function getTableRows() {</p>
<p>$("#entries").each(function(){</p>
<p>&#160;&#160; &#160; &#160;var $table = $(this);</p>
<p>&#160;&#160; &#160; &#160;var rows = $table.find(&#39;tbody &#62; tr&#39;).get();</p>
</p>
<p>&#160;&#160; &#160; &#160; for (var i=0;i&#60;rows.length;i++) {</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160;var $thisRow = rows[i].id;</p>
<p>&#160;&#160; &#160; &#160; &#160;&#160;$("#" + $thisRow).bind("click",function(e){</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160;if (!e.ctrlKey){</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; clearEntries();</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; $("#entries").jqGrid(&#39;setSelection&#39;,this.id);</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; }</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; });</p>
<p>&#160;&#160; &#160; &#160;}</p>
<p>&#160;&#160; });</p>
<p>&#160;}</p>
</p>
<p>function clearEntries()&#160;{</p>
<p>&#160;&#160; &#160;$(".cbox:checked").each(function(e){</p>
<p>&#160;&#160; &#160; &#160; &#160;if ($(this).attr(&#39;checked&#39;)) {</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160;var id = this.id;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; var getUnderscore = id.indexOf("_");</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; var firstPos = getUnderscore+1;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; var lastPos = id.length;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; var newID = id.substring(firstPos,lastPos);</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160;$("#entries").jqGrid(&#39;setSelection&#39;,newID);</p>
<p>}</p>
<p>})</p>
<p>}</p>
</div>
]]></description>
        	        	<pubDate>Fri, 05 Mar 2010 00:07:34 +0200</pubDate>
        </item>
        <item>
        	<title>bdensmore on Multiselect Features</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/multiselect-features#p15368</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/multiselect-features#p15368</guid>
        	        	<description><![CDATA[<p>I&#39;m trying to figure out how to make the jqGrid behave similar to how grids work in most applications, but I&#39;m not sure if all of these behaviors currently exist. I&#39;m using version 3.6.4.</p>
</p>
<p>Basically, what I need to do.</p>
</p>
<p>1. Allow multiselect with the ctrl key.</p>
<p>2. Allow to click a single row without holding down ctrl key when multiselect is on</p>
<p>3. Allow the use of the shift key to select multiple rows at one time. So if I click row 2 and then hold down shift and click row 6, rows 2-6 are selected.</p>
</p>
<p>Is it possible to have all these options at once?</p>
</p>
<p>When I have multiselect enabled and multikey set, I can&#39;t select a single row at a time, it always forces me to hold down the ctrl key.</p>
</p>
<p>I started writing my own function to allow a user to select a single row when multiselect is on, but I wanted to see if these options are currently available already.</p>
</p>
<p>Thanks,</p>
<p>Ben</p>
]]></description>
        	        	<pubDate>Thu, 04 Mar 2010 23:00:02 +0200</pubDate>
        </item>
</channel>
</rss>