<?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: "Search Templates" demo not available or not work</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/search-templates-demo-not-available-or-not-work</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/search-templates-demo-not-available-or-not-work/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on "Search Templates" demo not available or not work</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/search-templates-demo-not-available-or-not-work#p27919</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/search-templates-demo-not-available-or-not-work#p27919</guid>
        	        	<description><![CDATA[<p>By the way. If you have interest in the part of my suggestions about the usage of&#160;<em>closure</em>&#160;function you could find examples of such rewriting of the method <strong>addJSONData</strong> <a href="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.3.2/js/grid.base5.js" target="_blank">here</a> and <a href="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.3.2/js/grid.base5.js" target="_blank">here</a> (it&#39;s more old attempt). The code are based on jqGrid 4.3.2. The most imprtant part of the file is new implementation of <strong>addJSONData</strong> method and dependend functions <strong>encodeAttrVal, generateFieldReader, generateFullIdReader, generateCellAttr, generateCellFormatter, generateSubgridCellBuilder, generateMultiselectCellBuilder, genarateRowNumberCellBuilder, generateCellBuilder</strong>.</p>
<p>Best regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Sat, 15 Dec 2012 02:21:40 +0200</pubDate>
        </item>
        <item>
        	<title>tony on "Search Templates" demo not available or not work</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/search-templates-demo-not-available-or-not-work#p27900</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/search-templates-demo-not-available-or-not-work#p27900</guid>
        	        	<description><![CDATA[<p>Oleg,</p>
</p>
<p>As ususal&#160; invaluable recommendations. Now I&#39;m going to read these more carfully and eventually ask for little help.</p>
<p>The first step that I should do is to reorganize and rewrite the demo.</p>
<p>Also I will publish the demo in GitHub. This wil hellp us a lot with recommenrdations, fixes and etc.</p>
</p>
<p>Thank you very much again.</p>
<p>I will keep you in touch</p>
</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 12 Dec 2012 13:17:17 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on "Search Templates" demo not available or not work</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/search-templates-demo-not-available-or-not-work#p27887</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/search-templates-demo-not-available-or-not-work#p27887</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>if you have a little time in the next two weeks it would be nice to make some small (or less small) improvements in jqGrid. I just wanted to post you some my ideas, just some subjects which are seems the mostly interesting from my point of view:</p>
<ul>
<li>changing error reporting in <strong>grid.inlinedit.js</strong> so that one can display exact error message from the custom validation mthod. Currently <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.inlinedit.js#L210" target="_blank">the line</a>&#160;perpends the name of the field and one space before the text&#160;of the error message. Any solution&#160;are welcome. For example one can&#160;add new option with format like for <strong>recordtext</strong>, <strong>pgtext</strong>&#160;etc or just use no prefix in case the custom formatter.</li>
<li>it would be practical to introduce <em>common error repoting way in jqGrid</em>. My personal favorite is the div inside of <em>gbox</em> or inside of <em>gview</em> and above of <em>ui-jqgrid-titlebar</em>. One can provide default implementation of <strong>loadErrorInternal</strong> or some other error callbacks which could be ovewritten by <strong>loadError</strong> etc. The callbacks could report the error by flashing the error message for 5-10 seconds above the grid (interval which could be configued or set to forever). After the interval the error div should be disapear (for example fadein/fadeout effects). In the case one can make large help for the begginer which uses jqGrid. Currently the wrong XML or JSON data or an error on the server side follows to empty grid without any error message. Showing error messages by default could be very helpful. The possibility to customize error message will stay unchanged. In the way one could provide new feature without breaking of compatibility of existing solutions. If error callback like <strong>loadError</strong>&#160;already defined no standard error reporting (<strong>loadErrorInternal</strong>) will be used. One can introduce <strong>$.jgrid.error</strong> method which displays the error message in the error div and one can use it everywhere in the code in case of error reporting. It&#39;s better as the usage of <strong>alert</strong> which block UI.</li>
<li>in would be very helpful to specify validation of all input field in case of inline or form editing. Currently the validation breaks at the first error. One could build the list/array of errors for all invalid fields&#160;({colName: "...", errorDescription: "..."}). One can mark <strong>all</strong>&#160;the fields with "ui-state-error" class and set focus on the first field with error&#160;(see <a href="http://stackoverflow.com/a/6162086/315935" target="_blank">the answer</a> for an example). One can add title (tooltip) with error description on the corresponding field with error.</li>
<li>introduction of any way to provide <em>custom formatter</em>&#160;and some custom additional properties (like <em>cellattr</em>, <em>formatoptions</em> etc) for predefined columns ("<em>subgrid</em>", "<em>rn</em>", "<em>cb</em>"). It could be enough to have the possibility to apply <strong>$.extend(true, ...)</strong> with the corresponding properties. One can just include one-tree lines of code to make it possible. Alternatively (or additionally) one could incroduce one callback which will be called at the end of initializing part of jqGrid: after calling of <strong>populate()</strong> in <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.base.js#L2630" target="_blank">the line</a>. The callback could be practical for many common customizations.</li>
</ul>
<p>If you have interest to improve performance of jqGrid I could suggest some ways which I see for it:</p>
<ul>
<li>the most simple and effective way to improve performace in many cases is making of upades of the DOM elemens on <em>temporary disconnected</em> grid or parts of grid. Look at the example of the function <strong>removeToInsertLater</strong>&#160;from <a href="https://developers.google.com/speed/articles/javascript-dom" target="_blank">the article</a>. One can use the aproach in many cases where <em>multiple changes</em> needed be done. In my tests methods&#160;<a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.base.js#L1061-L1079" target="_blank">emptyRows</a>&#160;or <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.base.js#L3412-L3428" target="_blank">clearGridData</a>&#160;can took a lot of time in case of reloading of large grid. Another example is the method <strong>showHideCol</strong> called for large grid and many columns. If one need to hide or to show <em>multiple columns</em> the action will be currently done <em>not as one operation</em> on the HTML document. So many <a href="https://developers.google.com/speed/articles/reflow" target="_blank">browser reflow</a> will be made. Temporary removing of the whole grid from the page and reinserting it back after all actions will be done can improve the performance of the modifications in many times.</li>
<li>I wrote you before about performance improvement by generating of <em>closure</em> function which build cell, row and so on. If the column has no formatter and no cellattr at all for example the building of the cell of the column could be done by calling of the simplest closure which body contains only
<p><input type='button' class='sfcodeselect' name='sfselectit6337' value='Select Code' data-codeid='sfcode6337' /></p>
<div class='sfcode' id='sfcode6337'>val ? String(val) : &#34;&#34;</div>
<p>&#160;or if&#160;<strong>autoencode: true</strong>&#160;is used then</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4369' value='Select Code' data-codeid='sfcode4369' /></p>
<div class='sfcode' id='sfcode4369'>val ? $.jgrid.htmlEncode(val): &#34;&#34;</div>
<p>(the code of every from the closure is even more simple as the body of <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.base.js#L1003-L1005" target="_blank">cellVal</a>&#160;method). <strong><span style="text-decoration: underline;">NO ADDITIONAL CODE WILL BE EXECUTED</span></strong>. All tests of parameters of colModel will be done <strong><em><span style="text-decoration: underline;">once</span></em></strong> at the beginning of <strong>addJSONData</strong> or <strong>addXmlData</strong>. So the actions made in the loop will be short and quick. In the current implementation <em>common code</em> of <strong>formatCol</strong>,&#160;<strong>formatter</strong>,&#160;<strong>cellVal</strong>,&#160;<strong>addCell</strong>&#160;will be executed every time if the cell for the column will be added in the new row. Instead of that one could analyse the opetion of the every column of colModel once and generate closure for exery column. The complaxity of the closure will depend from the complexity of properties used. The only problem is that relativly many changes of the code of <em>grid.base.js</em> need be done. The function <strong>addJSONData</strong>, <strong>addXmlData</strong>,&#160;<strong>formatCol</strong>, <strong>formatter</strong>, <strong>cellVal</strong>, <strong>addCell</strong>, <strong>addMulti</strong>, <strong>addRowNum</strong> need be full rewritten. The advantage will be the best possible performance which is really attractive. I have codes of such changes based on more old version of jqGrid. It works very good.</p>
</li>
</ul>
<p>There are a lot of other ways of further development of jqGrid which I see, but I don&#39;t wanted to post too long text here. <img class="spSmiley" style="margin:0" title="Smile" src="/blog/wp-content/forum-smileys/sf-smile.gif" alt="Smile" /></p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Mon, 10 Dec 2012 14:42:05 +0200</pubDate>
        </item>
        <item>
        	<title>tony on "Search Templates" demo not available or not work</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/search-templates-demo-not-available-or-not-work#p27886</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/search-templates-demo-not-available-or-not-work#p27886</guid>
        	        	<description><![CDATA[<p>Oleg,</p>
<p>Thanks again for the recommendation.</p>
<p>The demo is really very very old - (the client and server parts should be tottaly rewriten.</p>
<p>I have some time this and next week, so any ideas on how to organize change and design are welcome.</p>
</p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 10 Dec 2012 12:33:49 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on "Search Templates" demo not available or not work</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/search-templates-demo-not-available-or-not-work#p27883</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/search-templates-demo-not-available-or-not-work#p27883</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>The demo "Search Templates" found under "Searching" will be shown in the tree part of <a href="http://trirand.com/blog/jqgrid/jqgrid.html" target="_blank">the demo</a> only in Google Chrome. IE and Firefox don&#39;t shows the demo at all. Clicking on the text "Search Templates" in the tree node don&#39;t open any demo.</p>
<p>One more remark. It would be nice to reorganize the tree part of the demo based on the features provided by jqGrid. The parts like "New since beta 3.0", "New in version 3.1" abd so on are difficult for the visitors.</p>
<p>One more remark. I see from regelmassig example of code copied from "Loading Data" / "Array Data". The demo was made for very old version of jqGrid in the time when no local data was supported. Moreover the for-loop of the demo contain wrong expression <strong>i&#60;=mydata.length</strong> instead of <strong>i&#60;mydata.length</strong>. The demos which use addRowData should be reduced in my opinion and the option <strong>gridview: true</strong> should be added in practically every demo.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Mon, 10 Dec 2012 12:11:48 +0200</pubDate>
        </item>
</channel>
</rss>