<?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: Re-order columns</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns</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/feature-request/re-order-columns/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p10175</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p10175</guid>
        	        	<description><![CDATA[<p>Mark,</p>
<p>Thanks. Merged.</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 26 Sep 2009 00:52:47 +0300</pubDate>
        </item>
        <item>
        	<title>markw65 on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p10157</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p10157</guid>
        	        	<description><![CDATA[<blockquote>
<p>tony said:</p>
<p>Again me,</p>
<p>This is not correct fix. The correct fix should be in multiselect plugin &#8211; i.e when we add a new visible column (whitout reordering) the select list should be updated.</p>
<p>Tony</p>
</blockquote>
<hr />
<p>Tony,</p>
</p>
<p>I&#39;ve just pushed a fix. I&#39;ve overridden the ui.multiselect&#39;s _setSelected method to keep the options array sorted correctly.</p>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Fri, 25 Sep 2009 11:06:43 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p10039</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p10039</guid>
        	        	<description><![CDATA[<p>Mark,</p>
<p>Looking deeper in your fix I will say, that it is better than my.</p>
<p>I have merged the fix. I do not have do all the tests, but I think during the release we will polish it.</p>
<p>About cache!?! Cache IMHO should be applied with care and I do not want implement it currently in the grid.</p>
<p>I think that all is ok with the fix &#8211; suppose that the most grids contain 5-30 columns, this will not impact  too much the performance, looping only once per request throght the array.</p>
<p>As your said &#8211; the most heavy things are when we do with&#160; DOM manipulation.</p>
<p>Next week (if all goes ok) I will do more on the grid as promised. It is pleasure for me to work with you.</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 23 Sep 2009 06:12:27 +0300</pubDate>
        </item>
        <item>
        	<title>markw65 on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p10012</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p10012</guid>
        	        	<description><![CDATA[<p>Tony,</p>
</p>
<p>Regarding speed - I completely agree, and I think your efforts have certainly paid off; jqGrid is very fast.</p>
</p>
<p>But the cost of a lookup in an array of length "n", is completely dwarfed by the cost of fetching a number of lines of length "n" from a remote server, creating table rows from them, and inserting them into the DOM. I think we can afford to do the lookup once per fetch...</p>
</p>
<p>Also, for things like this (if performance /was/ an issue), you could cache the last value and then check to see if the cached result is valid - and get the performance but keep things dynamic...</p>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Tue, 22 Sep 2009 13:32:18 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9997</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9997</guid>
        	        	<description><![CDATA[<p>Mark,</p>
<p>Thanks for iii) and ii) .</p>
<p>Also you are right, in my solution is not possible to make these dynamic (as before).</p>
<p>My primary goal (as of the whohle grid) was speed, but it seems that in this case we can not implement my fix.</p>
<p>Will test your fix tomorrow and make a merge.</p>
<p>Thanks again.</p>
</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 22 Sep 2009 11:29:25 +0300</pubDate>
        </item>
        <item>
        	<title>markw65 on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9982</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9982</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
</p>
<p>No problem. But I see a couple of issues with your solution:</p>
<p>i) you can no longer change xmlReader.id, jsonReader.id, xmlmap or jsonmap after the grid is created</p>
<p>ii) it doesnt handle the case of ts.p.xmlReader.id is an integer, and repeatitems is true.</p>
<p>iii) there&#39;s a bug in the xmlreader:&#160; if(f &#38;&#38; ts.p.keyIndex[1]) idn = ts.p.keyIndex[1];<br />That should be if (f.length...) since f is always true. This is in part related to ii), but fixing this doesnt fix ii).</p>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Tue, 22 Sep 2009 09:01:00 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9973</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9973</guid>
        	        	<description><![CDATA[<p>Mark,</p>
<p>Sorry that I do not see your last message. With my last post I mean, that I will fix this.</p>
<p>I pushed my solution in the GitHub. I have made allmost all tests, but not the full ones.</p>
<p>Will see and test your solution. We should at end put one.</p>
<p>Sorry again.</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 22 Sep 2009 04:29:42 +0300</pubDate>
        </item>
        <item>
        	<title>markw65 on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9970</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9970</guid>
        	        	<description><![CDATA[<p>I&#39;ve pushed a fix.</p>
</p>
<p>I&#39;ve made a small change to the xml reader behavior - if the id is a number, it uses it as the column index (just like the json reader).</p>
</p>
<p>Otherwise, I think the behavior is as before (except that id&#39;s are now correct after reordering with repeatitems:false, and a numeric id, or a "key" field).</p>
</p>
<p>There are a lot of cases - Im not sure Ive tested them all...</p>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 23:23:00 +0300</pubDate>
        </item>
        <item>
        	<title>markw65 on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9949</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9949</guid>
        	        	<description><![CDATA[<p>OK. I see the problem.</p>
</p>
<p>"reader" returns the items in the current order. So for repeatitems false, the index is looked up incorrectly.</p>
</p>
<p>Should be easy to fix - I&#39;ll take a look tonight (if you havent fixed it first).</p>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 10:55:52 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9947</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9947</guid>
        	        	<description><![CDATA[<p>Mark,</p>
<p>I&#39;m just looking into the code how to fix this.</p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 10:42:30 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9946</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9946</guid>
        	        	<description><![CDATA[<p>The important thing is that after reordering you must click to next page using the pager.</p>
<p>Just you can see in Fire bug what are the id after reordering and clicking on next page.</p></p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 10:34:05 +0300</pubDate>
        </item>
        <item>
        	<title>markw65 on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9945</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9945</guid>
        	        	<description><![CDATA[<p>Edit: I hadnt seen your last post. I do see the problem in your example. I&#39;ll keep looking...</p>
</p>
<p>Still not seeing it&#8230; the rowid is fetched from the row /as returned by the server/, so doesnt (and shouldnt) use orderedCols.</p>
</p>
<p>My example is almost identical to yours (language aside!) and Im not having any issues&#8230;</p>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 10:28:13 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9944</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-4#p9944</guid>
        	        	<description><![CDATA[<p>Mark,</p>
<p>Here is the example:</p>
<p><a href="http://www.trirand.com/test/jsonmap.html" rel="nofollow" target="_blank">http://www.trirand.com/test/jsonmap.html</a></p>
<p>1. Select row</p>
<p>2. click Get id link ( the value from first column is alerted)</p>
<p>3. reorder columns so that the Inv No is not first.</p>
<p>4. Click next page.</p>
<p>5. Select row and click Get id link - the value of the first column is alerted</p></p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 10:18:18 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9943</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9943</guid>
        	        	<description><![CDATA[<p>Yes the problem is not in the reordering, but in orderedCols function which does not care about the id. Will try to explain it in example.</p></p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 09:40:49 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9942</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9942</guid>
        	        	<description><![CDATA[<p>Yes the problem is not in the reordering, but in orderedCols function which does not care about the id. Will try to explain it in example.</p></p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 09:40:43 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9941</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9941</guid>
        	        	<description><![CDATA[<p>Life example</p>
<p>Here is the config:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5979' value='Select Code' data-codeid='sfcode5979' /></p>
<div class='sfcode' id='sfcode5979'>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype : &#39;json&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jsonReader :{repeatitems:false,id:&#8221;0&#8243;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel : [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;Id&#39;, name: &#39;invid&#39;, hidden:true, width:1, search:false, hidedlg: true},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;No Ð¤Ð°ÐºÑ‚ÑƒÑ€Ð°&#39;, name:&#39;invno&#39;, index:&#39;invno&#39;, width: 60, hidedlg:true},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;Ð”Ð°Ñ‚Ð°&#39;, name:&#39;invdate&#39;, index:&#39;invdate&#39;, width:60, formatter: &#39;date&#39;, searchoptions:{dataInit:function(el){$(el).datepicker();}}},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;Ð¡Ñ€Ð¾Ðº ÐŸÐ».&#39;, name:&#39;paydate&#39;, index:&#39;paydate&#39;, hidden: true, width:60, formatter: &#39;date&#39;, searchoptions:{dataInit:function(el){$(el).datepicker();}}},&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;ÐšÐ».No&#39;, name:&#39;clientid&#39;, index:&#39;invoice.clientid&#39;, width: 50, hidden:true, searchoptions:{searchhidden:true}},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;ÐšÐ»Ð¸ÐµÐ½Ñ‚&#39;, name:&#39;cname&#39;, index:&#39;clients.cname&#39;, width: 120},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;Ð”Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚&#39;, name:&#39;docid&#39;, index:&#39;invoice.docid&#39;, width: 1, hidedlg:true, hidden: true, searchoptions:{searchhidden:true} },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;Ð”Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚&#39;, name:&#39;docname&#39;, index:&#39;doctype.docname&#39;, width: 120,search:false},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;Ð¡ÑƒÐ¼Ð°&#39;, name:&#39;amount&#39;, index:&#39;amount&#39;, width: 70, align:&#39;right&#39;, formatter:&#39;number&#39;, searchoptions:{sopt:[&#39;eq&#39;,&#39;ne&#39;,&#39;gt&#39;,&#39;ge&#39;,&#39;lt&#39;,&#39;le&#39;]}},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;ÐžÐ±Ñ‰Ð¾&#39;,&#160; name:&#39;total&#39; , index:&#39;total&#39;, width: 70, align:&#39;right&#39;, formatter:&#39;number&#39;, searchoptions:{sopt:[&#39;eq&#39;,&#39;ne&#39;,&#39;gt&#39;,&#39;ge&#39;,&#39;lt&#39;,&#39;le&#39;]}},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;ÐŸÐ»Ð°Ñ‚ÐµÐ½Ð°&#39;,&#160; name:&#39;pay_amount&#39; , index:&#39;pay_amount&#39;, width: 70, align:&#39;right&#39;, formatter:&#39;number&#39;, searchoptions:{sopt:[&#39;eq&#39;,&#39;ne&#39;,&#39;gt&#39;,&#39;ge&#39;,&#39;lt&#39;,&#39;le&#39;]}},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;ÐÐ½ÑƒÐ».&#39;, name:&#39;anulate&#39;, index:&#39;anulate&#39;, width: 30, formatter:&#39;select&#39;, editoptions:{value:{1:&#39;Ð”Ð°&#39;,0:&#39;ÐÐµ&#39;}},stype:&#39;select&#39;, searchoptions:{sopt:[&#39;eq&#39;]}},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {label: &#39;Ð¢Ð¾Ð².&#39;, name:&#39;bill_included&#39;, index:&#39;anulate&#39;, hidden:true, width: 30, formatter:&#39;select&#39;, editoptions:{value:{1:&#39;Ð”Ð°&#39;,0:&#39;ÐÐµ&#39;}},stype:&#39;select&#39;, searchoptions:{sopt:[&#39;eq&#39;]}}<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ],</p>
</div>
<p>After reordering I get wrong id</p>
<p>Sorry for edit.</p>
<p>I mean after pagging the coulmns are ok, but the id is wrong</p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 09:33:08 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9940</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9940</guid>
        	        	<description><![CDATA[<p>The problem appear if you ask for the id - getGridParam(&#39;selrow&#39;)</p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 09:30:35 +0300</pubDate>
        </item>
        <item>
        	<title>markw65 on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9939</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9939</guid>
        	        	<description><![CDATA[<p>Tony,</p>
</p>
<p>Im having trouble reproducing the problem - Im not even sure what the problem is.</p>
</p>
<p>One thing to note is that the id in the json reader (or xml reader) is not used when you set "key":true on a column (setting key takes priority), so your step 2 does nothing - unless that&#39;s the bug you&#39;re referring to? But in that case, its not related to the column reordering...</p>
</p>
<p>Mark</p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 09:27:29 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9907</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9907</guid>
        	        	<description><![CDATA[<p>Mark,</p>
<p>To reproduce:</p>
<p>1. Set in colModel the property for some column key:true. If the column is hidden and is first all is ok, but the problem appear when it is visible.</p>
<p>2. Json reader repeatitems : true or reapeatitems:false&#160; and the id is set as number &#8211; something like</p>
<p>jsonReader : {repeatitems: true(false), id:&#8221;0&#8243;}, where id :&#8221;0&#8243;, point to the first column.</p>
</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 21 Sep 2009 06:13:40 +0300</pubDate>
        </item>
        <item>
        	<title>markw65 on Re-order columns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9902</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/re-order-columns/page-3#p9902</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
</p>
<p>Re: ui.multiselect. Yes, there&#39;s a bug. It looks like there is an "experimental" version in github which has fixed this, but also introduces dependencies on a couple of new plugins.</p>
</p>
<p>Re: repeatitems false. I think I do see /a/ problem - if the xml reader has its index specified by ts.p.xmlReader.id, then it tries to look it up by name, even if the index is numeric; but Im pretty sure I didnt change that behavior (ie its nothing to do with column reordering).</p>
</p>
<p>I did find a bug in addXMLData that I introduced for the repeatitems true case: if the server doesnt return all the columns (ie, it just returns the first few), then it errors out. The fix is in gitHub.</p>
</p>
<p>Mark</p></p>
]]></description>
        	        	<pubDate>Sun, 20 Sep 2009 23:27:10 +0300</pubDate>
        </item>
</channel>
</rss>