<?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: viewGridRow() not updating all fields on row change</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/viewgridrow-not-updating-all-fields-on-row-change</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/viewgridrow-not-updating-all-fields-on-row-change/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>earachefl on viewGridRow() not updating all fields on row change</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/viewgridrow-not-updating-all-fields-on-row-change#p25627</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/viewgridrow-not-updating-all-fields-on-row-change#p25627</guid>
        	        	<description><![CDATA[<p>Since Oleg has decided that column names can&#39;t include spaces if you want to use viewGridRow(), I decided to hack the function.</p>
<p>&#160;I added this line:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8311' value='Select Code' data-codeid='sfcode8311' /></p>
<div class='sfcode' id='sfcode8311'>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='sfselectit5683' value='Select Code' data-codeid='sfcode5683' /></p>
<div class='sfcode' id='sfcode5683'>
<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='sfselectit7191' value='Select Code' data-codeid='sfcode7191' /></p>
<div class='sfcode' id='sfcode7191'>
<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.</p>
]]></description>
        	        	<pubDate>Tue, 10 Jan 2012 15:08:23 +0200</pubDate>
        </item>
        <item>
        	<title>earachefl on viewGridRow() not updating all fields on row change</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/viewgridrow-not-updating-all-fields-on-row-change#p25585</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/viewgridrow-not-updating-all-fields-on-row-change#p25585</guid>
        	        	<description><![CDATA[<p>I&#39;m initializing the grid like so:</p>
<p>&#160;&#160;&#160; $("#mainGrid").jqGrid({<br />&#160;&#160;url : g_MainGridUrl,<br />&#160;&#160;datatype : &#39;json&#39;,<br />&#160;&#160;height : 460,<br />&#160;&#160;autowidth : true,<br />&#160;&#160;colNames : g_ColNames,<br />&#160;&#160;colModel : g_ColModel,<br />&#160;&#160;pager : &#39;#pager&#39;,<br />&#160;&#160;rowNum : 100,<br />&#160;&#160;rowList : [100, 200, 300],<br />&#160;&#160;sortname : g_DefaultSort,<br />&#160;&#160;sortorder : &#39;desc&#39;,<br />&#160;&#160;sortable: true,<br />&#160;&#160;viewrecords : true,<br />&#160;&#160;caption : &#39;Results&#39;,<br />&#160;&#160;hidegrid : false,<br />&#160;&#160;rownumbers : true,&#160;&#160;&#160;<br />&#160;&#160;jsonReader : {<br />&#160;&#160;&#160;root : "ROWS",<br />&#160;&#160;&#160;page : "PAGE",<br />&#160;&#160;&#160;total : "TOTAL",<br />&#160;&#160;&#160;records : "RECORDS",<br />&#160;&#160;&#160;cell : "",<br />&#160;&#160;&#160;id : g_DefaultSort<br />&#160;&#160;},<br />&#160;&#160;loadComplete: function(){<br />&#160;&#160;&#160;var num_records = $(&#39;#mainGrid&#39;).getGridParam(&#39;records&#39;);<br />&#160;&#160;&#160;$(&#39;#gview_mainGrid div.ui-jqgrid-titlebar span&#39;).html(&#39;Results: &#39;+num_records);<br />&#160;&#160;},<br />&#160;&#160;loadBeforeSend : function(thisXhr) {<br />&#160;&#160;&#160;xhr = thisXhr;<br />&#160;&#160;},<br />&#160;&#160;ondblClickRow: function(rowid) {<br />&#160;&#160;&#160;&#160;&#160; jQuery(this).jqGrid(&#39;viewGridRow&#39;, rowid, { width: "500&#8243;});<br />&#160;&#160;}<br />&#160;});<br />&#160;<br />&#160;$("#mainGrid").jqGrid(&#39;navGrid&#39;, &#39;#pager&#39;, {<br />&#160;&#160;del : false,<br />&#160;&#160;add : false,<br />&#160;&#160;edit : false,<br />&#160;&#160;refresh:false,<br />&#160;&#160;search: false,<br />&#160;&#160;view: true<br />&#160;});<br />&#160;<br />&#160;$("#mainGrid").jqGrid(&#39;navButtonAdd&#39;,&#39;#pager&#39;,{<br />&#160;&#160;caption: "Columns",<br />&#160;&#160;title: "Reorder Columns",<br />&#160;&#160;onClickButton : function (){<br />&#160;&#160;&#160;$("#mainGrid").jqGrid("columnChooser", {<br />&#160;&#160; &#160; &#160;&#160;&#160;done: function() {<br />&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;resize_the_grid();<br />&#160;&#160;&#160; &#160;&#160;&#160;},<br />&#160;&#160;&#160;&#160;height: 320<br />&#160; &#160;&#160;&#160;});<br />&#160;&#160;}<br />&#160;});</p>
<p>and calling the grid like so, after building a filter Object:</p>
<p>&#160;&#160;&#160; $(&#39;#mainGrid&#39;).setGridParam({<br />&#160;&#160;&#160;url : g_MainGridUrl + Ext.util.JSON.encode(filter)<br />&#160;&#160;});<br />&#160;$(&#39;#mainGrid&#39;).trigger("reloadGrid");&#160;</p>
<p>As the subject states, when I double-click on a row to view its record and then change rows from the modal dialog, not all columns get updated &#8211; some do, but not others. I thought it might be because I didn&#39;t have &#60;th&#62;s defined for the table, so I tried adding them. I have downloaded the most recent version (4.2.0). Any ideas?</p>
</p>
<p>UPDATE: I think I&#39;ve found the cause, but still don&#39;t have a solution. It seems that any column that has a title with a space in the name can&#39;t read the grid correctly. I confirmed by adding underscores to replace the spaces in the titles, and found that for each column corrected, its values began updating. I&#39;m filing a bug report.</p>
]]></description>
        	        	<pubDate>Wed, 04 Jan 2012 19:39:05 +0200</pubDate>
        </item>
</channel>
</rss>