<?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: Bug in viewgridrow with spaces in column name?</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name</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/bug-in-viewgridrow-with-spaces-in-column-name/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on Bug in viewgridrow with spaces in column name?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25889</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25889</guid>
        	        	<description><![CDATA[<p>Yes, it&#39;s what I mean. Pobably I expressed me not clear enough before. In general one can excape or use a numerical code of any ISO 10646 character (see <a href="/blog/ISO 10646 character" target="_blank">here</a>) used in the selector.</p>
<p>You can use code like</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4530' value='Select Code' data-codeid='sfcode4530' /></p>
<div class='sfcode' id='sfcode4530'>$.extend($.jgrid, {<br />&#160; &#160; jqID: function (sid) {<br />&#160; &#160; &#160; &#160; return String(sid).replace(/[!&#34;#$%&#38;&#39;()*+, .\\/:;&#60;=&#62;?@\\[\\\\\\]\\^`{&#124;}~]/g,&#34;\\\\$&#38;&#34;);<br />&#160; &#160; }<br />});</div>
<p>to change jqID without modification of the source code of jqGrid.</p>
<p>I don&#39;t recommend you use ids which includes blanks inside, but sometimes one have no control on the data which produce the foreign server code. So I personally find good to extend the code of jqID to include blank in the list of characters excaped by jqID.</p>
<p>@Tony: what do you think about?</p>
<p>Best regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Wed, 08 Feb 2012 12:00:32 +0200</pubDate>
        </item>
        <item>
        	<title>earachefl on Bug in viewgridrow with spaces in column name?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25886</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25886</guid>
        	        	<description><![CDATA[<p>Oleg, I just realized that you meant to modify the regex string inside jqID() to include spaces. That seems to do the trick.</p>
]]></description>
        	        	<pubDate>Tue, 07 Feb 2012 21:32:23 +0200</pubDate>
        </item>
        <item>
        	<title>earachefl on Bug in viewgridrow with spaces in column name?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25885</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25885</guid>
        	        	<description><![CDATA[<p>Oleg, I&#39;m not understanding how to use $.jgrid.jqID to accomplish this. Is this separate from the grid initialization? How is it supposed to be called? I&#39;ve tried adding:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1501' value='Select Code' data-codeid='sfcode1501' /></p>
<div class='sfcode' id='sfcode1501'>jQuery.jgrid.jqID(&#39; &#39;);</div>
<p>but this doesn&#39;t seem to have any affect.</p>
</p>
<p>Any help would be greatly appreciated.</p>
]]></description>
        	        	<pubDate>Tue, 07 Feb 2012 19:44:12 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Bug in viewgridrow with spaces in column name?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25630</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25630</guid>
        	        	<description><![CDATA[<p>If you want modify the code you should better use <strong>$.jgrid.jqID</strong> instead of replacement of blanks to undescores. The function <strong>$.jgrid.jqID</strong> are used in the most places of jqGrid code, but still not everywhere. The problem it very easy. It one have <a href="http://api.jquery.com/category/selectors/" target="_blank">meta-characters</a> as the part of id and one want to use the id as a part of the jQuery selector one have to escape the characters. The method <a href="https://github.com/tonytomov/jqGrid/blob/master/js/grid.base.js#L131-133" target="_blank">$.jgrid.jqID</a> do exactly the job.</p>
<p>Regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Tue, 10 Jan 2012 16:10:00 +0200</pubDate>
        </item>
        <item>
        	<title>earachefl on Bug in viewgridrow with spaces in column name?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25626</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25626</guid>
        	        	<description><![CDATA[<p>I decided to hack viewGridRow() instead. I added this line:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3785' value='Select Code' data-codeid='sfcode3785' /></p>
<div class='sfcode' id='sfcode3785'>nm = nm.replace(&#39; &#39;, &#39;_&#39;);</div>
<p>in two places; first between these two lines in function createData():</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit430' value='Select Code' data-codeid='sfcode430' /></p>
<div class='sfcode' id='sfcode430'>
<p>setme = false;&#160;</p>
<p>nm = this.name;&#160;</p>
</div>
<p>second, between these two lines in function fillData():</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit465' value='Select Code' data-codeid='sfcode465' /></p>
<div class='sfcode' id='sfcode465'>
<p>nm = obj.p.colModel[i].name;</p>
<p>// hidden fields are included in the form&#160;</p>
</div>
<p>Now, all ids are created with underscores in the place of spaces and all is well.<br />&#160;&#160;</p>
<p>&#160; &#160; &#160;</p>
]]></description>
        	        	<pubDate>Tue, 10 Jan 2012 15:06:17 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Bug in viewgridrow with spaces in column name?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25615</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25615</guid>
        	        	<description><![CDATA[<p>Your problem is that you use <strong>tableToGrid</strong> plugin insted of the usage of jqGrid directly. If you need use titel having blanks you should use <strong>colNames</strong> option of jqGrid (or the same option of <strong>tableToGrid</strong>) instead of the usage of ids having blanks.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Sat, 07 Jan 2012 02:40:46 +0200</pubDate>
        </item>
        <item>
        	<title>earachefl on Bug in viewgridrow with spaces in column name?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25613</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p25613</guid>
        	        	<description><![CDATA[<p>Oleg, I have to say that I consider this to be a design flaw. We shouldn&#39;t have to follow variable naming constraints for our titles. If spaces in the IDs that are created are a no-no, why not have jqgrid insert underscores when it creates the IDs?</p>
]]></description>
        	        	<pubDate>Fri, 06 Jan 2012 23:22:47 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on Bug in viewgridrow with spaces in column name?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p22024</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p22024</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I posted the answer on your question <a href="http://stackoverflow.com/questions/4948643/jqgrid-viewgridrow-bug/4950697#4950697" target="_blank">here</a>. The usage of ids having blanks in &#60;th&#62; elements is the same as the usage of name and index properties of colModel with the blanks inside. It is wrong. Just remove the ids from &#60;th&#62; elements or use the values without blanks.</p>
<p>Best regards<br />Oleg&#160;</p></p>
]]></description>
        	        	<pubDate>Wed, 09 Feb 2011 23:47:34 +0200</pubDate>
        </item>
        <item>
        	<title>Octavient on Bug in viewgridrow with spaces in column name?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p22021</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/bug-in-viewgridrow-with-spaces-in-column-name#p22021</guid>
        	        	<description><![CDATA[<p>I&#39;m using the tableToGrid feature, along with the viewGridRow feature. &#160;When the viewGridRow method is called, the dialog displays correctly. &#160;But when paging through records using the Pager Buttons, OR when you close the dialog and execute the viewGridRow method on another record, the values for all columns whose names have a space (" ") in them do not get updated. &#160;They keep the value that was placed there by the first viewGridRow execution. &#160;The values for all columns whose names do NOT have a space get updated as they should. &#160;</p>
<p>I&#39;ve tried recreateForm:true (although this is a property of the editGridRow method, and not the viewGridRow method), and this did not resolve the issue. &#160;Also tried various, semi-random combinations of other settings.</p>
<p>Below is my code. &#160;Ideas?</p>
</p>
<p>tableToGrid("#mytable", height:&#39;400&#39;,</p>
<p><span style="white-space: pre;"> </span>ondblClickRow: function(rowid,iRow,iCol,e) {</p>
<p><span style="white-space: pre;"> </span>jQuery("#mytable").viewGridRow(rowid, {closeOnEscape:true});</p>
<p><span style="white-space: pre;"> </span>}</p>
<p>});</p>
<p><!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px} --></p>
<p class="p1">&#60;table id="mytable"&#62;</p>
<p class="p1">&#60;thead&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;tr class="header"&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="CustomerID"&#62;CustomerID&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="Account ID"&#62;Account ID&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="Customer"&#62;Customer&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="System"&#62;System&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="Make/Model"&#62;Make/Model&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="Modality"&#62;Modality&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="Last Login"&#62;Last Login&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="Attachments"&#62;Attachments&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="Alerts"&#62;Alerts&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="Last Log Entry"&#62;Last Log Entry&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="Last HE Level"&#62;Last HE Level&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="HE Level Threshold"&#62;HE Level Threshold&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="DBOD Threshold"&#62;DBOD Threshold&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;th id="HE Data Latency"&#62;HE Data Latency&#60;/th&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;/tr&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;/thead&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;tbody&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;tr&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;1&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;32222222&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;ABC Company&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;Smith Warehouse Bay #1&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;Make/Model&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;MRI&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;Dec 20 2010 12:18PM by Frank Smith&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;0&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;0&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;60&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;0.35&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;td&#62;&#60;/td&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;/tr&#62;</p>
<p class="p1"><span style="white-space: pre;"> </span>...</p>
<p class="p1"><span style="white-space: pre;"> </span>&#60;/tbody&#62;</p>
<p class="p1">&#60;/table&#62;</p>
]]></description>
        	        	<pubDate>Wed, 09 Feb 2011 19:52:25 +0200</pubDate>
        </item>
</channel>
</rss>