<?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: Enable multiselect</title>
	<link>http://www.trirand.com/blog/?page_id=393/treegrid/enable-multiselect</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/treegrid/enable-multiselect/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>jhermsen on Enable multiselect</title>
        	<link>http://www.trirand.com/blog/?page_id=393/treegrid/enable-multiselect#p19786</link>
        	<category>TreeGrid</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/treegrid/enable-multiselect#p19786</guid>
        	        	<description><![CDATA[<p>I enabled multiselect in the TreeGrid and haven&#39;t found an issue yet so I thought I&#39;d share the thing I did.</p>
</p>
<p>In the grid.base.js find:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9906' value='Select Code' data-codeid='sfcode9906' /></p>
<div class='sfcode' id='sfcode9906'>if(this.p.treeGrid === true){<br />&#160;&#160; &#160;try { $(this).jqGrid(&#34;setTreeGrid&#34;);} catch (_) {}<br />&#160;&#160; &#160;if(ts.p.datatype != &#34;local&#34;) { ts.p.localReader = {id: &#34;_id_&#34;};	}<br />}</div>
<p>Then move the part just below it of multiselect above this tree grid section so it looks like:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5344' value='Select Code' data-codeid='sfcode5344' /></p>
<div class='sfcode' id='sfcode5344'>if(this.p.multiselect) {<br /> &#160;&#160;this.p.colNames.unshift(&#34;&#60;input role=&#39;checkbox&#39; id=&#39;cb_&#34;+this.p.id+&#34;&#39; class=&#39;cbox&#39; type=&#39;checkbox&#39;/&#62;&#34;);<br /> &#160;&#160;this.p.colModel.unshift({name:&#39;cb&#39;,width:isSafari ? ts.p.multiselectWidth+ts.p.cellLayout : ts.p.multiselectWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:&#39;center&#39;,fixed:true});<br /> }<br /> if(this.p.treeGrid === true) {<br /> &#160;&#160;try { $(this).jqGrid(&#34;setTreeGrid&#34;);} catch (_) {}<br /> &#160;&#160;if(ts.p.datatype != &#34;local&#34;) { ts.p.localReader = {id: &#34;_id_&#34;};	}<br /> }</div>
<p>Then you just niet to remove the disabling of the multiselect in the setTreegrid method of grid.treegrid.js:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3805' value='Select Code' data-codeid='sfcode3805' /></p>
<div class='sfcode' id='sfcode3805'>setTreeGrid : function() {<br /> &#160;&#160;return this.each(function (){<br /> &#160;&#160;&#160;&#160;var $t = this, i=0, pico;<br /> &#160;&#160;&#160;&#160;if(!$t.p.treeGrid) { return; }<br /> &#160;&#160;&#160;&#160;if(!$t.p.treedatatype ) { $.extend($t.p,{treedatatype: $t.p.datatype}); }<br /> &#160;&#160;&#160;&#160;$t.p.subGrid = false; $t.p.altRows =false;<br /> &#160;&#160;&#160;&#160;$t.p.pgbuttons = false; $t.p.pginput = false;<br /> &#160;&#160;&#160;&#160;<span style=&#34;&#34;text-decoration:&#34;><strong>// re-enable multiselect $t.p.multiselect = false;<br /></strong></span><strong>&#160;&#160; &#160;$t.p.rowList = [];</strong></div>
<p>Please also let me know if you do happen to run into issues.</p></p>
]]></description>
        	        	<pubDate>Wed, 15 Sep 2010 09:17:22 +0300</pubDate>
        </item>
</channel>
</rss>