<?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: jqgrid editGridRow showing a blank form on edit</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-editgridrow-showing-a-blank-form-on-edit</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/jqgrid-editgridrow-showing-a-blank-form-on-edit/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>gratzc on jqgrid editGridRow showing a blank form on edit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-editgridrow-showing-a-blank-form-on-edit#p24101</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-editgridrow-showing-a-blank-form-on-edit#p24101</guid>
        	        	<description><![CDATA[<p>Nevermind, I figured it out. &#160;In case anyone else has a similar issue, it was because my data from the server was returning the ID as a number, so an id of 1 became 1.0 or an id of 7654 became 7654.0, as soon as I had the server return the ID as a string it worked fine.</p>
</p>
<p>Curt</p>
]]></description>
        	        	<pubDate>Fri, 29 Jul 2011 14:40:58 +0300</pubDate>
        </item>
        <item>
        	<title>gratzc on jqgrid editGridRow showing a blank form on edit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-editgridrow-showing-a-blank-form-on-edit#p24064</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-editgridrow-showing-a-blank-form-on-edit#p24064</guid>
        	        	<description><![CDATA[<p>I have a grid with the following setup.  When I edit on the grid, the form doesn&#39;t come up with the data populated, but if I type in the data, the edit sends the data to the server correctly and it is updated, but the form is always blank.  Also the record paging on the edit form doesn&#39;t appear to be working.  I have another grid on the same page that works fine and have done this successfully many times before, but can&#39;t figure out whats going on.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1187' value='Select Code' data-codeid='sfcode1187' /></p>
<div class='sfcode' id='sfcode1187'> $("#questionlist").jqGrid({  			url: &#39;remote/someurlstuff&#39;,  			datatype: &#39;json&#39;,  			colNames: [ 				&#39;ID&#39;, 				&#39;</p>
<div class="ui-icon ui-icon-document" title="Edit">Edit</div>
<p>&#39;, 				&#39;</p>
<div class="ui-icon ui-icon-trash" title="Delete">Delete</div>
<p>&#39;, 				&#39;Question&#39; 			],  			colModel: [ 				/* 					Column widths must total... 					773 pixels to fill full body area 					713 pixels to fill a accordian area 					675 pixels to fill a uniform area 				*/ 				{name:&#39;id&#39;,index:&#39;id&#39;, width:10, sorttype:&#39;int&#39;, hidden:false}, 				{name:&#39;edit&#39;, index:&#39;edit&#39;, width:21, align:&#39;center&#39;, sortable:false}, 				{name:&#39;delete&#39;, index:&#39;delete&#39;, width:21, align:&#39;center&#39;, sortable:false}, 				{name:&#39;question&#39;, index:&#39;question&#39;, edittype:&#39;text&#39;, editoptions: {size:40,maxlength:4000}, width:633, editable: true, sorttype:&#39;string&#39;,hidden:false}   			],  			pager: $(&#39;#questionpager&#39;),  			pgbuttons: true,  			pginput: true,  			recordtext: &#39;{0} to {1} of {2}&#39;,  			emptyrecords: &#39;&#39;,  			emptyDataText: &#39;Sorry, there are no records to display.&#39;,  			hidegrid: false,  			rowNum: 10,  			rowList: [2,5,10,25,100],  			pagerpos: &#39;right&#39;,  			recordpos: &#39;center&#39;,  			sortorder: &#39;asc&#39;,  			sortname: &#39;ID&#39;,  			height: &#39;auto&#39;,  			  			sortorder: &#39;asc&#39;,  			viewrecords: true,  			caption: &#39;Questions&#39;,  			  			gridComplete:  				function ()  				{  					  				}  			,  			loadComplete:  				function ()  				{  					if ($(&#39;#questionlist&#39;).getGridParam(&#39;records&#39;) == 0) { // are there any records?  						var grid = $(&#39;#questionlist&#39;);  						var emptyText = grid.getGridParam(&#39;emptyDataText&#39;); // get the empty text  						var container = grid.parents(&#39;.ui-jqgrid-view&#39;); // find the grid&#39;s container  						container.find(&#39;.ui-jqgrid-hdiv, .ui-jqgrid-bdiv&#39;).hide(); // hide the column headers and the cells below  						container.find(&#39;.no-records&#39;).hide();  						container.find(&#39;.ui-jqgrid-titlebar&#39;).after(&#39;</p>
<div class="no-records">&#39; + emptyText + &#39;</div>
</div>
<p>&#39;); // insert the empty data text  					} else {  						var grid = $(&#39;#questionlist&#39;);  						var emptyText = grid.getGridParam(&#39;emptyDataText&#39;); // get the empty text  						var container = grid.parents(&#39;.ui-jqgrid-view&#39;); // find the grid&#39;s container  						container.find(&#39;.ui-jqgrid-hdiv, .ui-jqgrid-bdiv&#39;).show();  						container.find(&#39;.no-records&#39;).hide();  					}  				}  			,  			jsonReader: {  					 						root: &#39;ROWS&#39;, //our data 						page: &#39;PAGE&#39;, //current page 						total: &#39;TOTAL&#39;, //total pages 						records: &#39;RECORDS&#39;, //total record 						cell: &#39;&#39;, 						id: &#39;0&#39; //will default first column as ID 				  		}});</p>
</p>
<p>And this for the grid edit call</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7947' value='Select Code' data-codeid='sfcode7947' /></p>
<div class='sfcode' id='sfcode7947'> //Desc: jqGrid pop up form for editing an existing answer  	//Param: id - this is the ID field of the row to edit  	function editQuestion(id){  		jQuery("#questionlist").editGridRow(id,  			{  				url:&#39;someurltoeditthedata&#39;,  				width:&#39;400&#39;,  				reloadAfterSubmit:true,  				beforeShowForm: function(formid){  					$(".tinfo").css(&#39;display&#39;, &#39;none&#39;);  				},  				afterSubmit: function(data) {  					$(&#39;#isDirty&#39;).val(&#39;true&#39;);    					$(".tinfo").css(&#39;display&#39;, &#39;inline&#39;);  					$(".tinfo").css(&#39;color&#39;, &#39;green&#39;);  					$(".topinfo").align=&#39;center&#39;;  					$(".topinfo").html("SAVED...");    					return [true,&#39;success&#39;,1];  				},  				recreateForm: true  			});  	} </div>
<p>Thanks for any help</p>
]]></description>
        	        	<pubDate>Tue, 26 Jul 2011 15:05:59 +0300</pubDate>
        </item>
</channel>
</rss>