<?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: cell editing of grid having subgrids as grid</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid</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/cell-editing-of-grid-having-subgrids-as-grid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on cell editing of grid having subgrids as grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p25132</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p25132</guid>
        	        	<description><![CDATA[<p>Hello Paul,</p>
<p>if you need make any modifcation in the jqGrid code you need use <strong>jquery.jqGrid.src.js</strong> instead of <strong>jquery.jqGrid.min.js</strong>. If you really need to use the file in production you can create minimized version of the file yourself. To do this you can choose any your favorite minifier. Just search in internet for the words <strong>JavaScript</strong> and <strong>minifier</strong> and you will find many versions from there. Every has its advantages and disadvantaged. The first well-known minifier was <a href="http://www.crockford.com/javascript/jsmin.html" target="_blank">JSMin</a>. There are <a href="http://code.google.com/closure/compiler/" target="_blank">Closure Compiler</a>,&#160;<a href="http://ajaxmin.codeplex.com/" target="_blank">Microsoft Ajax Minifier</a>, <a href="http://developer.yahoo.com/yui/compressor/" target="_blank">YUI Compressor</a>, and so on.</p>
<p>You can compare the results of different minifires <a href="http://javascript-compressor.org/" target="_blank">here</a>. Corresponds to the tests the best restults you will get with the Closure Compiler. In case of the usage of <strong>jquery.jqGrid.min.js</strong>&#160;on the web server with <em>enabled compression</em> you need look at the size of GZIPed version of the file.</p>
<p>In my experiments with the current version of Closure Compiler</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3561' value='Select Code' data-codeid='sfcode3561' /></p>
<div class='sfcode' id='sfcode3561'>java -jar compiler.jar &#8211;compilation_level ADVANCED_OPTIMIZATIONS &#8211;js=jquery.jqGrid.src.js &#8211;js_output_file=jquery.jqGrid.min.js</div>
<p>I got file jqGrid.min.js with the size&#160;185.981 bytes. It&#39;s better as 239.659 bytes of&#160;the&#160;<strong>jquery.jqGrid.min.js </strong>from <a href="/blog/?page_id=6" target="_blank">trirand download</a>. The problem with the usage of<strong>ADVANCED_OPTIMIZATIONS</strong>&#160;parameter that to use it correct one need create the list of&#160;<em>extern</em>&#160;methods (see&#160;<a href="http://code.google.com/closure/compiler/docs/api-tutorial3.html#externs" target="_blank">here</a>). Only after that one will have not only small, but also working code. If you don&#39;t want invest your time in creating the list of&#160;<em>extern</em>&#160;methods you can use <a href="http://ajaxmin.codeplex.com/" target="_blank">Microsoft Ajax Minifier</a>. In my tests the ms-minimized version of jquery.jqGrid.src.js has the size 234.088 and gziped: 64.546 which is smaller as 239.659 and 66.938 correspondingly for <strong>jquery.jqGrid.min.js</strong> from&#160;<a href="/blog/?page_id=6" target="_blank">trirand download</a>.</p>
<p><strong>@Tony</strong>: If you find time you can play a little with Closure Compiler. Probably you can use it in the official jqGrid download package?</p>
<p>Best regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Fri, 11 Nov 2011 13:54:36 +0200</pubDate>
        </item>
        <item>
        	<title>paulmcgarry on cell editing of grid having subgrids as grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p25131</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p25131</guid>
        	        	<description><![CDATA[<p>UPDATE :</p>
<p>Realised my problem.</p>
<p>Went back to the source file, made the change, and minified it.</p>
<p>Solved. Thanks for the bug fix.</p>
</p>
<p>Regards</p>
<p>Paul.</p>
<p>------------------------------------------</p>
<p>Hi OlegK</p>
<p>I am having this problem.</p>
<p>I downloaded the latest version of jqGrid (4.2) today which I don&#39;t think contains the fix.</p>
<p>I searched for the LINE you mentioned should be changed, but could not find it.</p>
<p>Wondering which version should I be working with, in order to get this working&#8230;?</p>
<p>Either to be able to apply the fix, or find one that contains the fix?</p>
<p>I use the file jquery.jqGrid.min.js which contains all code, for all options &#8211; As downloaded with all options selected.</p>
<p>Can you help?</p>
</p>
<p>Regards Paul</p>
<hr />
]]></description>
        	        	<pubDate>Fri, 11 Nov 2011 13:17:10 +0200</pubDate>
        </item>
        <item>
        	<title>0xFF on cell editing of grid having subgrids as grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p25111</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p25111</guid>
        	        	<description><![CDATA[<p>Hello,&#160;</p>
<p>Is this bug&#160;already&#160;fixed in git repo?</p>
<p>Nasty bug! It took me few days of&#160;digging&#160;around what&#39;s is wrong with my code 😉</p>
</p>
<p>Thanks for great plugin, and looking forward for the fix 😉</p>
<p>Best regards&#160;</p>
<p>Piotr</p>
]]></description>
        	        	<pubDate>Thu, 10 Nov 2011 12:44:39 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on cell editing of grid having subgrids as grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p24981</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p24981</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p><a href="http://www.ok-soft-gmbh.com/jqGrid/SubgridCellEditing.htm" target="_blank">the fixed demo</a>&#160;seems work good with many level of subgrids. Which problem you see here? What behavior you expect and what you see?</p>
<p>Regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Tue, 25 Oct 2011 13:21:18 +0300</pubDate>
        </item>
        <item>
        	<title>tony on cell editing of grid having subgrids as grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p24980</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p24980</guid>
        	        	<description><![CDATA[<p>Oleg,</p>
<p>Thanks again,</p>
<p>This seems reasonable, but what about when we have 3 and more&#160; levels subgrids ?</p>
<p>Should think</p>
</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 25 Oct 2011 12:55:03 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on cell editing of grid having subgrids as grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p24957</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/cell-editing-of-grid-having-subgrids-as-grid#p24957</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
</p>
<p>there are a bug in cell editing of grid having subgrids as grid. If cell of subgrid will be clicked the click event will be fire twice: one for the subgrid and one more time for the main grid. The reason is easy &#8211; both grids have registerd click event (see the line <a href="https://github.com/tonytomov/jqGrid/blob/v4.2.0/js/grid.base.js#L2276" target="_blank">2276</a> of grid.base.js). The problem is that click event in the main grid will be wrong processed. Firsts it will be found &#60;tr&#62; element</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1570' value='Select Code' data-codeid='sfcode1570' /></p>
<div class='sfcode' id='sfcode1570'>ptr = $(td,ts.rows).closest(&#34;tr.jqgrow&#34;);</div>
<p><em>in the subgrid</em> and then will be calculated indexes</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2981' value='Select Code' data-codeid='sfcode2981' /></p>
<div class='sfcode' id='sfcode2981'>ri = ptr[0].rowIndex;<br />ci = $.jgrid.getCellIndex(td);&#160;</div>
<p>also in the subgrid, but the next line</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9769' value='Select Code' data-codeid='sfcode9769' /></p>
<div class='sfcode' id='sfcode9769'>try {$(ts).jqGrid(&#34;editCell&#34;,ri,ci,true);} catch (_) {}</div>
<p>uses the indexes from the subgrid to start editing of the cell in the main grid. So instead of editing of one cell in the subgrid one start additionally editing one more cell in the main grid.</p>
<p>In my opinion the easiest way to fix the problem is just <strong>to</strong>&#160;<strong>ignore</strong>&#160;the click event which is fired in the subgrid during click processing in the main grid. One can do this for example by changing the line <a href="https://github.com/tonytomov/jqGrid/blob/v4.2.0/js/grid.base.js#L2279" target="_blank">2279</a> of grid.base.js from</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3896' value='Select Code' data-codeid='sfcode3896' /></p>
<div class='sfcode' id='sfcode3896'>if($(ptr).length === 0 &#124;&#124; ptr[0].className.indexOf( &#39;ui-state-disabled&#39; ) &#62; -1 ) {</div>
<p>to</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1342' value='Select Code' data-codeid='sfcode1342' /></p>
<div class='sfcode' id='sfcode1342'>if($(ptr).length === 0 &#124;&#124; ptr[0].className.indexOf( &#39;ui-state-disabled&#39; ) &#62; -1 &#124;&#124; $(td,ts).closest(&#34;table.ui-jqgrid-btable&#34;)[0].id !== ts.id) {</div>
<p>The bug can one see live on <a href="http://www.ok-soft-gmbh.com/jqGrid/SubgridCellEditing0.htm" target="_blank">the demo</a>. After the bug fix the editing work correct (see <a href="http://www.ok-soft-gmbh.com/jqGrid/SubgridCellEditing.htm" target="_blank">the fixed demo</a>).</p>
<p>The bug and the fix is described in my answer <a href="http://stackoverflow.com/questions/7860221/cell-editing-in-sub-grid-and-parent-grid-of-jqgrid/7863262#7863262" target="_blank">here</a>.</p>
</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Sun, 23 Oct 2011 12:46:09 +0300</pubDate>
        </item>
</channel>
</rss>