<?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: Trouble with Add New Row feature</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/trouble-with-add-new-row-feature</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/trouble-with-add-new-row-feature/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Trouble with Add New Row feature</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/trouble-with-add-new-row-feature#p16106</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/trouble-with-add-new-row-feature#p16106</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Glad that everthing is ok andf so good explained</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 31 Mar 2010 19:07:10 +0300</pubDate>
        </item>
        <item>
        	<title>Preichow on Trouble with Add New Row feature</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/trouble-with-add-new-row-feature#p15994</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/trouble-with-add-new-row-feature#p15994</guid>
        	        	<description><![CDATA[<hr />
<p>Ladies and Gentlemen, I am pleased to report that I figured out the solution to this problem.</p>
<p>The solution to adding fields to a Modal Box when Adding a New Row is to use the "editable" property to the ColModel that created the grid, as shown here:</p>
<p>colModel:[<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;id&#39;,index:&#39;id&#39;, width:55,editable:false,editoptions:{readonly:true,size:10}}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;invdate&#39;,index:&#39;invdate&#39;, width:80,editable:true,editoptions:{size:10}} ],</p>
</p>
<p>First, you assign a property called "editable", and if you want the ability to edit the field you assign that to "true".&#160; (if the property is false (or missing, which then defaults to False), then the field won&#39;t even appear in the modal box).&#160; This was my problem.</p>
<p>Next, you assign some editoptions that will control whether the input is a checkbox, or a field, and how big the field is.</p>
<p>When you hit the Submit button, the data will be added to your grid, and the Modal box will be refreshed, but the Box does not close automatically.&#160;&#160;&#160; This allows to you enter multiple datasets without re-opening the box each time. To close the box, you have to hit cancel.&#160; (To make this situation more clear to users, you might consider renaming the box as "Close" instead of cancel.</p>
<p>Please note that there is one other option to refresh the data from the database upon a data submission.</p></p>
]]></description>
        	        	<pubDate>Sat, 27 Mar 2010 04:21:29 +0200</pubDate>
        </item>
        <item>
        	<title>Preichow on Trouble with Add New Row feature</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/trouble-with-add-new-row-feature#p15974</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/trouble-with-add-new-row-feature#p15974</guid>
        	        	<description><![CDATA[<p>Update:</p>
<p>After much experimentation, I can get either the server to pull data into a working grid, OR I can display a Add New Row dialog box containing the data entry rows, but I can&#39;t do both.</p>
<p>I&#39;m not sure what I&#39;m missing, and the documentation isn&#39;t clear on this.</p></p>
]]></description>
        	        	<pubDate>Fri, 26 Mar 2010 06:48:23 +0200</pubDate>
        </item>
        <item>
        	<title>Preichow on Trouble with Add New Row feature</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/trouble-with-add-new-row-feature#p15973</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/trouble-with-add-new-row-feature#p15973</guid>
        	        	<description><![CDATA[<p>I just discovered that the Add New Row function needs to go in the body, not the head, to work.</p>
<p>I moved the script below to the body, and now the Input Form pops open, but it contains no data.</p>
<p>Anybody know how to populate the input form?&#160; I image you call a function and populate the options with the desired input fields?</p>
<p>($("#bedata").click(function(){&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />jQuery("#list").jqGrid(&#39;editGridRow&#39;,"new",{height:280,reloadAfterSubmit:false});&#160;</p>
]]></description>
        	        	<pubDate>Fri, 26 Mar 2010 03:45:41 +0200</pubDate>
        </item>
        <item>
        	<title>Preichow on Trouble with Add New Row feature</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/trouble-with-add-new-row-feature#p15933</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/trouble-with-add-new-row-feature#p15933</guid>
        	        	<description><![CDATA[<p>I&#39;m trying to implement the Add New Row feature, but having trouble.&#160; My grid works great, but when I click on the "Enter Data" button nothing happens (the dialog box fails to pop open).&#160; </p>
<p>I&#39;m thinking that maybe I&#39;m missing a .js file, or I don&#39;t have the button tied into the grid correctly.&#160; I&#39;ve totally read the documentation and examples, but have hit a wall.</p>
<p>Any ideas? Code is listed below (I apologize if I should have used a special formatting command to paste code).</p>
<p>&#60;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br />&#160;&#160;&#160; "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&#62;<br />&#60;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&#62;<br />&#60;head&#62;<br />&#60;meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see <a href="http://www.w3.org" rel="nofollow" target="_blank">http://www.w3.org</a>" /&#62;<br />&#60;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&#62;<br />&#60;title&#62;My First Grid&#60;/title&#62;<br />&#60;link rel="stylesheet" type="text/css" media="screen" href="css/ui-lightness/jquery-ui-1.7.2.custom.css" /&#62;<br />&#60;link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" /&#62;<br />&#60;style type="text/css"&#62;<br />/*&#60;![CDATA[*/</p>
<p>html, body {<br />&#160;&#160;&#160; margin: 0;<br />&#160;&#160;&#160; padding: 0;<br />&#160;&#160;&#160; font-size: 75%;<br />}<br />/*]]&#62;*/</p>
<p>&#60;/style&#62;</p>
<p>&#60;script src="js/jquery-1.3.2.min.js" type="text/javascript"&#62; &#60;/script&#62;<br />&#60;script src="js/i18n/grid.locale-en.js" type="text/javascript"&#62; &#60;/script&#62;<br />&#60;script src="js/jquery.jqGrid.min.js" type="text/javascript"&#62; &#60;/script&#62;<br />&#60;script src="src/grid.celledit.js" type="text/javascript"&#62; &#60;/script&#62;<br />&#60;script type="text/javascript"&#62;<br />//&#60;![CDATA[<br />jQuery(document).ready(function(){ <br />&#160; jQuery("#list").jqGrid({<br />&#160;&#160;&#160; url:&#39;example.php&#39;,<br />&#160;&#160;&#160; datatype: &#39;xml&#39;,<br />&#160;&#160;&#160; mtype: &#39;GET&#39;,<br />&#160;&#160;&#160; colNames:[&#39;Inv No&#39;,&#39;Date&#39;, &#39;Amount&#39;,&#39;Tax&#39;,&#39;Total&#39;,&#39;Notes&#39;],<br />&#160;&#160;&#160; colModel :[ <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;invid&#39;, index:&#39;invid&#39;, width:55}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;invdate&#39;, index:&#39;invdate&#39;, width:90}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;amount&#39;, index:&#39;amount&#39;, width:80, align:&#39;right&#39;}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;tax&#39;, index:&#39;tax&#39;, width:80, align:&#39;right&#39;}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;total&#39;, index:&#39;total&#39;, width:80, align:&#39;right&#39;}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;note&#39;, index:&#39;note&#39;, width:150, sortable:false} <br />&#160;&#160;&#160; ],<br />&#160;&#160;&#160; pager: &#39;#pager&#39;,<br />&#160;&#160;&#160; rowNum:10,<br />&#160;&#160;&#160; rowList:[10,20,30],<br />&#160;&#160;&#160; sortname: &#39;invid&#39;,<br />&#160;&#160;&#160; sortorder: &#39;desc&#39;,<br />&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160; caption: &#39;My first grid&#39;<br />&#160; }); <br />}); <br />//]]&#62;<br />&#60;/script&#62;<br />&#60;script type="text/javascript"&#62;<br />//&#60;![CDATA[<br />$("#bedata").click(function(){ <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#list").jqGrid(&#39;editGridRow&#39;,"new",{height:280,reloadAfterSubmit:false}); <br />});</p>
<p>//]]&#62;<br />&#60;/script&#62;<br />&#60;style type="text/css"&#62;<br />/*&#60;![CDATA[*/<br />&#160;div.c1 {text-align:center;}<br />/*]]&#62;*/<br />&#60;/style&#62;<br />&#60;/head&#62;<br />&#60;body&#62;<br />&#60;table id="list" class="scroll"&#62;&#60;/table&#62;<br />&#60;div id="pager" class="scroll c1"&#62;&#60;/div&#62;<br />&#60;form&#62;&#60;input type="button" id="bedata" value="Enter Data" /&#62;&#60;/form&#62;<br />&#60;/body&#62;<br />&#60;/html&#62;</p>
]]></description>
        	        	<pubDate>Thu, 25 Mar 2010 07:16:50 +0200</pubDate>
        </item>
</channel>
</rss>