<?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: Inline editing having issue when colName has special chars</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/inline-editing-having-issue-when-colname-has-special-chars</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/help/inline-editing-having-issue-when-colname-has-special-chars/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Inline editing having issue when colName has special chars</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/inline-editing-having-issue-when-colname-has-special-chars#p20326</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/inline-editing-having-issue-when-colname-has-special-chars#p20326</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Yes this is true. The name from colModel is the name in form.</p>
<p>For the allowed characters for the name attribute you can look here:</p>
<p><a rel="nofollow" href="http://www.razzed.com/2009/01/30/valid-characters-in-attribute-names-in-htmlxml/" target="_blank"></a><a href="http://www.razzed.com/2009/01/" rel="nofollow" target="_blank">http://www.razzed.com/2009/01/</a>.....n-htmlxml/</p>
<p>or here</p>
<p><a rel="nofollow" href="http://www.razzed.com/2009/01/30/valid-characters-in-attribute-names-in-htmlxml/" target="_blank"></a><a href="http://www.razzed.com/2009/01/" rel="nofollow" target="_blank">http://www.razzed.com/2009/01/</a>.....n-htmlxml/</p>
</p>
<p>That is chars listed from you are not acceptable in the name attributte</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 15 Oct 2010 17:28:11 +0300</pubDate>
        </item>
        <item>
        	<title>Meng Hai on Inline editing having issue when colName has special chars</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/inline-editing-having-issue-when-colname-has-special-chars#p20315</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/inline-editing-having-issue-when-colname-has-special-chars#p20315</guid>
        	        	<description><![CDATA[<p style="padding-left: 150px;">Hi,</p>
<p>My intent is to have a grid with dynamic number of columns and column header - read from a table depending on how many records the user enter.</p>
<p>All seems well except that the inline cell editing doesn&#39;t work if the Column Header has certain Characters eg: the&#160;phrase &#39;Function&#39;, or Special Chars like &#38;amp;, +, ^, ~.</p>
<p>The column headers shows the symbol correctly and the cells show the value correctly, .... just that when invoking the function afterSaveCell, the value portion becomes undefined.</p>
</p>
<p>Gist of my code is:<br />===========</p>
<p>&#160;&#160;$("#gridmain").jqGrid(&#39;GridUnload&#39;);&#160;<br />&#160;&#160;$("#gridmain").jqGrid(&#39;jqGridImport&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;{&#160;impurl:"getexamcolumnHOD.php?mode=list&#38;level="+level+"&#38;prev_sid="+prev_sid+"&#38;year="+year+"&#38;term="+term+"&#38;class="+classid+"&#38;tid="+tid,</p>
<p>&#160;&#160;&#160;&#160;&#160;imptype: "xml",<br />&#160;&#160;&#160;&#160;&#160;mtype: "POST",<br />&#160;&#160;&#160; &#160;importComplete:function(){</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#gridmain").jqGrid(&#39;setGridParam&#39;,{afterSaveCell: function (rowid,celname,value,iRow,iCol){</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //if decimal value, to round up&#160;to next integer with a&#160;customised function - otherwise to show value&#160; in uppercase as the value might be a grading.<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if (value.indexOf(".")&#62;=0) // error shown here stating value is undefined when viewed using firebug<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; value = roundNumber(value,1);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#gridmain").jqGrid(&#39;setCell&#39;,rowid,iCol,value,{});<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}else{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; value=value.toUpperCase();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // and finally to save the edited value to table using ajax.</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ajaxCall("saveexammarkdbHOD.php", "id="+rowid+"&#38;val="+value+"&#38;fullmark="+st+"&#38;scid="+scid+"&#38;level="+level+"&#38;prev_sid="+prev_sid+"&#38;year="+year +"&#38;term="+term+"&#38;class="+classid+"&#38;tid="+tid,"forAjax");</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }});</p>
<p>&#160;&#160;&#160;&#160;&#160;}<br />&#160;&#160;&#160; });</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</p>
<p>In getexamcolumnHOD.php, I code it to pull the neccessary cell values to display in the grid. I am having issue at:</p>
<p>&#60;colNames&#62;$descript&#60;/colNames&#62;</p>
</p>
<p>Things are ok if $descript is a simple alphanumeric info. The column header display and the edited cell values get saved.</p>
<p>But when $descript contains &#38;, ^, +, ~ and others special chars, the column header and the cell values are displayed correctly... but when the cell is being edited, the cell becomes blank and the grid hangs.</p>
<p>How to overcome having&#160;special chars in &#60;colNames&#62;? I need to at least allow the symbol &#38;.</p>
<p>Thanks.</p></p>
]]></description>
        	        	<pubDate>Fri, 15 Oct 2010 08:58:26 +0300</pubDate>
        </item>
</channel>
</rss>