<?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: Resizing ColumnChooser dialog</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog</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/bugs/resizing-columnchooser-dialog/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>davgino on Resizing ColumnChooser dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p31448</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p31448</guid>
        	        	<description><![CDATA[<p>I have nextÂ code :</p>
<p>$grid.jqGrid('columnChooser', {<br />
Â  Â  Â  Â  Â  Â  Â  msel_opts: {dividerLocation: 0.5},<br />
Â  Â  Â  Â  Â  Â  Â  width:550,<br />
Â  Â  Â  Â  Â  Â  Â  height:300, Â <strong>for ver. 4.7.0 not work</strong><br />
Â  Â  Â  Â  Â  Â  Â  done : function (perm) {<br />
Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  if (perm) { // ok button<br />
Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  this.jqGrid("remapColumns", perm, true);<br />
Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  $grid.setGridWidth(wscreen-2, true);<br />
Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â }<br />
Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  else { // cancel button</p>
<p>Â  Â  Â  Â  Â  Â  Â  Â }<br />
 }</p>
<p>Â </p>
<p>height:300, Â <strong>for ver. 4.7.0 not work</strong></p>
<p>$grid.setGridWidth(wscreen-2, true);Â <strong>for ver &#60;4.7.0 work ok</strong></p>
<p><strong>but in ver</strong>Â <strong>4.7.0</strong>Â , if scrool vertical is present Â , I Â  modified with $grid.setGridWidth(wscreen<strong>+16</strong>, true);Â </p>
]]></description>
        	        	<pubDate>Thu, 11 Dec 2014 15:53:49 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Resizing ColumnChooser dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p31446</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p31446</guid>
        	        	<description><![CDATA[<p>Hi davgino,</p>
<p>you can use columnChooser exactly like before. The difference you will see if you resize the dialog. You will see that the elements of the dialog will be resized too.</p>
<p>Best regards<br />
Oleg</p>
]]></description>
        	        	<pubDate>Thu, 11 Dec 2014 14:07:23 +0200</pubDate>
        </item>
        <item>
        	<title>davgino on Resizing ColumnChooser dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p31442</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p31442</guid>
        	        	<description><![CDATA[<p>Hello Oleg,</p>
<p>Please explain how use new columnChooser from ver. 4.7.0</p>
<p>Thank you.</p>
]]></description>
        	        	<pubDate>Wed, 10 Dec 2014 20:10:39 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Resizing ColumnChooser dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p31177</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p31177</guid>
        	        	<description><![CDATA[<p>Hello Oleg,</p>
<p>Â </p>
<p>I have put your code for columnChooser in the official release.Â </p>
<p>Many thanks for this.</p>
<p>I have not minclude the other code for auto resizing columns I</p>
<p>Â </p>
<p>My Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 03 Oct 2014 11:38:34 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on Resizing ColumnChooser dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p31156</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p31156</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>I uploadedÂ <a href="https://github.com/OlegKi/jqGrid-plugins/blob/master/jQuery.jqGrid.columnChooser.js" target="_blank">here</a>Â the current version of <strong>columnChooser</strong> which I use. It is based on the current version ofÂ <strong>columnChooser</strong> on jqGrid. The changes are following</p>
<ul>
<li>variables are defined at the beginning of the functions</li>
<li>functions are declared before there will be used (for example function <strong>call</strong>)</li>
<li>functionÂ <span style="color: #333333"><strong>insert</strong> always return a value:Â <strong>return perm;</strong> is inserted at the end of the function</span></li>
<li>unneeded quotes are removed from all object properties in the code. For example the codeÂ <strong>opts = $.extend({"width" : 420,...});</strong> are replaced toÂ <strong>opts = $.extend({width : 420,...});</strong></li>
<li>testing forÂ <strong>if($.ui) {if ($.ui.multiselect ) {...}}</strong> are simplified. UnneededÂ test for <strong>opts.msel === "multiselect"</strong>Â are removed because the same name of multiselect pluging can have another name <strong>opts.msel</strong>. For example to solve problem with the same name of bothÂ jQuery UI Multiselect Widget and another fromÂ <a href="http://www.erichynds.com/blog/jquery-ui-multiselect-widget" rel="nofollow" target="_blank"><a href="http://www.erichynds.com/blog/" rel="nofollow">http://www.erichynds.com/blog/</a>.....ect-widget</a> one have to use <strong>$.widget.bridge</strong> and in the case one need use <strong>opts.msel</strong>Â with the name other asÂ <strong>"multiselect"</strong>.</li>
<li>parameter <strong>opts</strong> of the function <strong>dlog_opts</strong>Â are renamed to <strong>options</strong>. The variable <strong>opts</strong>Â are already used in outer scope. The usage of two <em>different</em> variables having <em>the same name</em> in the same code fragment make the code more complex to read.</li>
<li>some additional code are added at the end ofÂ <strong>columnChooser</strong>Â and as <strong>resize</strong> callback of the functionÂ <strong>dlog_opts</strong>. The code implements resizing of multiselect lists of dialog (from the content of the dialog)Â on resizing of the main Column Chooser dialog.</li>
</ul>
<p>Short comment to the resizing code. The original structure of content of the Column Chooser dialog looks like on the picture</p>
<p><a href="http://www.ok-soft-gmbh.com/jqGrid/columnChooserDialog1.png"><img src="http://www.ok-soft-gmbh.com/jqGrid/columnChooserDialog1.png" width="100"  class="sfimageleft spUserImage" alt="divs" /><img src="http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_Mouse.png" class="sfimageleft sfmouseleft" alt="Image Enlarger" /></a></p>
<p>If we start from the .ui-dialog-content then</p>
<ul>
<li>&#62;div&#62;select - internal hidden select list with the attribute multiple="multiple". It will be used internally. It's hidden and don't need be resized</li>
<li>&#62;div&#62;div.ui-multiselect - theÂ div with main information</li>
<li>&#62;div&#62;div.ui-multiselect&#62;div.selected - the left part of the dialog with the header and the list of visible columns</li>
<li>&#62;div&#62;div.ui-multiselect&#62;div.available - the right part of theÂ dialog with the header and the list of hidden columns</li>
<li>&#62;div&#62;div.ui-multiselect&#62;div.selected&#62;div.actions - the header of the list ofÂ visible columns</li>
<li>&#62;div&#62;div.ui-multiselect&#62;div.selected&#62;ul.selected - the list ofÂ visible columns</li>
<li>&#62;div&#62;div.ui-multiselect&#62;div.available&#62;div.actions - the header of the list of hiddenÂ columns</li>
<li>&#62;div&#62;div.ui-multiselect&#62;div.available&#62;ul.available -Â the list of hiddenÂ columns</li>
</ul>
<p>The code which I added in <strong>columnCooser</strong> at the end of the method changes CSS inline settings of the most above dives so that there have <strong>height: 100%; width: 100%; margin: auto</strong>. CSS of the right and the left pains (<strong>&#62;div&#62;.ui-multiselect&#62;.selected</strong> and <strong>&#62;div&#62;.ui-multiselect&#62;.available</strong>) will be set toÂ <strong>width: 50%; box-sizing: border-box</strong> (widthÂ value will be calculated based onÂ <strong>dividerLocation</strong>). After that the most elements of the dialog will be resized automatically correctly. One will just adjust the hight of ul elements (<strong>&#62;div&#62;div.ui-multiselect&#62;div.selected&#62;ul.selected</strong> and <strong>&#62;div&#62;div.ui-multiselect&#62;div.available&#62;ul.available</strong>). I did it inside ofÂ <strong>resize</strong>Â callback of the functionÂ <strong>dlog_opts</strong>.</p>
<p><a href="http://www.ok-soft-gmbh.com/jqGrid/WorkingColumnChooser_.htm" target="_blank">The demo</a>Â uses the code of new column chooser. Additionally is demonstrates usage ofÂ <strong>setColWidth</strong> method (see <a href="http://stackoverflow.com/a/20030652/315935" target="_blank">the answer</a>Â and <a href="https://github.com/OlegKi/jqGrid-plugins/blob/master/jQuery.jqGrid.setColWidth.js" target="_blank">here</a>). Tony you can include the method in the main code of jqGrid if you want. Additionally the demo demonstratesÂ <strong>autosizeColumns</strong> function which works slowly, but it allows to set column widths based on the width of maximalÂ contentÂ in the column and the column header. The requirement will be frequently asked. Probably the code could help other people.</p>
<p>Best regards<br />
 Oleg</p>
<p>P.S. I don't tested the resizing code in old versions of web browsers. If the tests will show some problems in the browsers I would suggest to add if(old browser) return to skip resizing code. In the way one will have correct resizing in new web browsers and one will have old (non-resizable) Column Chooser dialog in old browsers.</p>
]]></description>
        	        	<pubDate>Tue, 23 Sep 2014 01:32:14 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Resizing ColumnChooser dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p30854</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p30854</guid>
        	        	<description><![CDATA[<p>@Oleg I will try to see the patch, but IMHO the source code is too much for this.<br />
As always thank you for the support and invaluable experience with jqGrid. </p>
<p>Best Regards<br />
Tony</p>
]]></description>
        	        	<pubDate>Fri, 18 Jul 2014 17:29:06 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on Resizing ColumnChooser dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p30838</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p30838</guid>
        	        	<description><![CDATA[<p>I posted beforeÂ <a href="http://www.trirand.com/blog/?page_id=393/bugs/making-columnchooser-really-resizable/#p25823" target="_blank">the suggestion</a>Â (see <a href="http://stackoverflow.com/a/9688942/315935" target="_blank">the answer</a>Â too) which describe how to make <em>columnChooser</em> resizable. The code still work. You can just include the code starting withÂ <em><span class="pln">$</span><span class="pun">.</span><span class="pln">jgrid</span><span class="pun">.</span><span class="pln">extend</span><span class="pun">({</span><span class="pln">columnChooser </span><span class="pun">:</span><span class="kwd" style="color: #00008b">function</span><span class="pun">(</span><span class="pln">opts</span><span class="pun">)</span></em><span class="pun"><em>{...</em> fromÂ <a href="http://stackoverflow.com/a/9688942/315935" target="_blank">the answer</a>Â and include the code fragment afterÂ <em>jquery.jqGrid.min.js</em>. In the way you will replace the originalÂ code of <em>columnChooser</em>Â with resazable version of it.</span></p>
<p>@Tony: probably one could do modify the original code of <em>columnChooser</em>Â  in the way? I use the code in all my grids more as two years and I didn't found any problem with the modified code which I suggested.</p>
<p>Best regards<br />
Oleg</p>
]]></description>
        	        	<pubDate>Sun, 13 Jul 2014 17:36:33 +0300</pubDate>
        </item>
        <item>
        	<title>mdo77 on Resizing ColumnChooser dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p30834</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/resizing-columnchooser-dialog#p30834</guid>
        	        	<description><![CDATA[<p>You cannot make the ColumnChooser dialog non-resizable.</p>
<p>In the dlog_opts section, the "resizable" option gets set as "opts.resizable &#124;&#124; true" meaning sending a false will not do anything.</p>
]]></description>
        	        	<pubDate>Thu, 10 Jul 2014 22:52:38 +0300</pubDate>
        </item>
</channel>
</rss>