<?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: another possible column chooser bug</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/another-possible-column-chooser-bug</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/another-possible-column-chooser-bug/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>highrise on another possible column chooser bug</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/another-possible-column-chooser-bug#p13610</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/another-possible-column-chooser-bug#p13610</guid>
        	        	<description><![CDATA[<p>Thanks for the swift reply.</p>
</p>
<p>I am loading JSON data from a separate URL using setGridParam which then triggers a grid reload. I don&#39;t use setGridParam to change the structure of the main grid &#8211; the idea is that all the data is in the JSON, including anything that is not visible. So the JSON data stream always contains every column, hidden or otherwise &#8211; I did this thinking it would be easiest as I would not have to change the grid structure, simply give the user the option of viewing columns.</p>
<p>When I do basic reloads like this, the data does appears correctly, even after the user makes a column viewing selection. However, if I use the column selection option <em>after</em> the data has been reloaded following a column selection, it gets very confused. It&#39;s like the column selector has lost its way and doesn&#39;t know what order the columns are in. The names of the columns and the actual references to the columns themselves appear to have become mixed - &#39;name&#39; appears as a selectable option even though its &#39;hidedlg&#39; is set to true, and when you select it, it display the &#39;country&#39; column.</p>
<p>Are you saying that if the user chooses to hide a column, this effectively changes the grid structure &#8211; the column is not simply hidden, it&#39;s not part of the structure? I guess this would explain it. I&#39;ll keep experimenting but your input on how to avoid this would be invaluable, thank you.</p></p>
]]></description>
        	        	<pubDate>Wed, 06 Jan 2010 15:53:18 +0200</pubDate>
        </item>
        <item>
        	<title>markw65 on another possible column chooser bug</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/another-possible-column-chooser-bug#p13575</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/another-possible-column-chooser-bug#p13575</guid>
        	        	<description><![CDATA[<p>My guess is you&#39;re doing something wrong... but without know which params you&#39;re setting with setGridParam its hard to know.</p>
</p>
<p>The thing to be aware of is that when you reorder the columns, they are reordered in the colModel itself. The grid keeps a record of the permutation of the columns, and when you request data from the server, it re-orders it based on that permutation before loading it into the grid (at least, in the repeatitems:true case - for repeatitems:false the order of the data is irrelevant).</p>
</p>
<p>So if you use setGridParam to replace the colmodel, for example, bad things are going to happen (unless you are very careful).</p>
</p>
<p>Also, if you try to load data into the grid programatically (and not via addJSONData or addXMLData), yuo will have to take account of the new column order.</p>
</p>
<p>Finally, if you&#39;re just trying to show/hide columns, and dont want them to be re-ordered at all, you can replace the "done" function in the column chooser with a no-op.</p>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Wed, 06 Jan 2010 00:54:56 +0200</pubDate>
        </item>
        <item>
        	<title>highrise on another possible column chooser bug</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/another-possible-column-chooser-bug#p13573</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/another-possible-column-chooser-bug#p13573</guid>
        	        	<description><![CDATA[<p>hi guys</p>
</p>
<p>I think I have found another bug in the column chooser. I have a set of columns, some of which have &#39;hidedlg&#39; activated so that they cannot be chosen / unchosen by the user. This works until I load new data in using &#39;setGridparam&#39;. When I do this, the only columns shown are the ones the user has chosen.</p>
</p>
<p>In case this isn&#39;t clear, an example. I have a table with &#39;name&#39;, &#39;town&#39; and &#39;country&#39; in it. the user can choose to display the town or the country, but the name is always there. i.e</p>
</p>
<p>&#160;colModel:[<br />&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;id&#39;,index:&#39;id&#39;, width:20,hidden:true,hidedlg:true},<br />&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;name&#39;,index:&#39;name&#39;, width:120,hidedlg:true},<br />&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;town&#39;,index:&#39;location1&#39;, width:80},<br />&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;country&#39;,index:&#39;location3&#39;, width:20}</p>
<p>]</p>
</p>
<p>so the user can choose to display country or town, but id is always hidden and name is always visible.</p>
</p>
<p>However, when I run setGridParam and load new data from a script, it gets very confused indeed.</p>
</p>
<p>I don&#39;t know if this is exactly a bug or something that I should just not be doing? I should say it worked perfectly until I started using the &#39;hidedlg&#39; option.</p></p>
]]></description>
        	        	<pubDate>Tue, 05 Jan 2010 23:34:21 +0200</pubDate>
        </item>
</channel>
</rss>