<?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: Help with NavGrid Add button and appearance</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/help-with-navgrid-add-button-and-appearance</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/help-with-navgrid-add-button-and-appearance/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>gsutton on Help with NavGrid Add button and appearance</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-with-navgrid-add-button-and-appearance#p21479</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-with-navgrid-add-button-and-appearance#p21479</guid>
        	        	<description><![CDATA[<p>I have now modified the code so that it is only using the new API.&#160; I have also eliminated all extra tags to simplify it as you suggested.&#160; I put breakpoints on the system to view the value of data before it is sent to the webservice.&#160; The service is expecting 3 strings:&#160; test1, test2 and test3.&#160; The data I have experimented with to be {test1:"", test2:"", test3:""} or {"test1":"","test2":"","test3":""} as well as &#39;{"test1":"","test2":"","test3":""}&#39;.&#160; Each of these variations gives me a return value of parameter test1 expected when I try to insert the data.&#160;</p>
</p>
<p>Is this a problem with how I am using jqGrid or more likely to be my service?</p>
<p>Thanks for the help.</p>
</p>
<p>Geoff</p>
]]></description>
        	        	<pubDate>Wed, 29 Dec 2010 16:32:10 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Help with NavGrid Add button and appearance</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-with-navgrid-add-button-and-appearance#p21438</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-with-navgrid-add-button-and-appearance#p21438</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Please check your code again. Also check if you have loaded all the needed JavaScript and CSS files.</p>
<p>In order to isolate the problem begin with very simple example.</p>
</p>
<p>Also I see one time you use</p>
<p>.jqGrid(&#39;navGrid&#39;, &#39;#&#39; + pagerID, { add: false, edit: false, view: false, del: false, refresh: false, search: false })</p>
<p>but after this</p>
<p>jQuery("#" + tblName).navButtonAdd(&#39;&#8230;.</p>
</p>
<p>PLEASE TURN OFF THE $.jgrid.no_legacy_api option like this</p>
</p>
<p>$.jgrid.no_legacy_api = false</p>
</p>
<p>or use</p>
<p>jQuery("#" + tblName).jqGrid(&#39;navButtonAdd&#39;, &#8230;.</p>
</p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sun, 26 Dec 2010 14:32:01 +0200</pubDate>
        </item>
        <item>
        	<title>gsutton on Help with NavGrid Add button and appearance</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-with-navgrid-add-button-and-appearance#p21412</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-with-navgrid-add-button-and-appearance#p21412</guid>
        	        	<description><![CDATA[<p>Also, the Proper UI icons are not showing for the Add and Del buttons, instead it&#39;s just a caret and the name underneath.</p>
]]></description>
        	        	<pubDate>Thu, 23 Dec 2010 21:01:52 +0200</pubDate>
        </item>
        <item>
        	<title>gsutton on Help with NavGrid Add button and appearance</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-with-navgrid-add-button-and-appearance#p21410</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-with-navgrid-add-button-and-appearance#p21410</guid>
        	        	<description><![CDATA[<p>I have a site I am building which has variable parameters for the jqGrid to use.&#160; In IE8 it handles the click events correctly, but in Firefox, the Add button doesn&#39;t fire, the Delete button doesn&#39;t file and neither does it sort.&#160; Also in both browsers the "Alert" caption shows continuously even though nothing has been clicked.</p>
</p>
<p>I have changed none of the defaults.&#160; Here is my code:</p>
<p><span style="font-size: x-small;"><span style="font-size: x-small;">*********************************************************************</span></span></p>
<p>$(document).ready(function() {</p>
<p>var grid = jQuery("#" + tblName).jqGrid({</p>
<p>url: svcName + "/getRows",</p>
<p>datatype: &#39;json&#39;,</p>
<p>mtype: &#39;POST&#39;,</p>
<p>loadonce: true,</p>
<p>ajaxGridOptions: { contentType: &#39;application/json; charset=utf-8&#39; },</p>
<p>serializeGridData: function(postData) {</p>
<p>return JSON.stringify(postData);</p>
<p>},</p>
<p>jsonReader: {</p>
<p>root: function(obj) { return obj.d.rows; },</p>
<p>page: function(obj) { return obj.d.page; },</p>
<p>total: function(obj) { return obj.d.total; },</p>
<p>records: function(obj) { return obj.d.records; }</p>
<p>}, //jsonReader</p>
<p>columns: cols,</p>
<p>colModel: model,</p>
<p>onSelectRow: function(id) {</p>
<p>if (id &#38;&#38; id !== lastSel) {</p>
<p>if (lastSel == -1) test();</p>
<p>if (canEdit()) {</p>
<p>// cancel editing of the previous selected row if it was in editing state.</p>
<p>// jqGrid hold intern savedRow array inside of jqGrid object,</p>
<p>// so it is safe to call restoreRow method with any id parameter</p>
<p>// if jqGrid not in editing state</p>
<p>grid.jqGrid(&#39;saveRow&#39;, lastSel);</p>
<p>} //if canEdit()</p>
<p>lastSel = id;</p>
<p>} //if id!=lastSel</p>
<p>lastSel = id;</p>
<p>},</p>
<p>ondblClickRow: function(id, ri, ci) {</p>
<p>if (canEdit()) {</p>
<p>// edit the row and save it on press "enter" key</p>
<p>grid.jqGrid(&#39;editRow&#39;, id, true);</p>
<p>lastSel = id;</p>
<p>}</p>
<p>},</p>
<p>editurl: svcName + &#39;/updateRow&#39;,</p>
<p>pager: pagerID,</p>
<p>rowNum: 5000, //MAX rows to display?</p>
<p>gridview: true,</p>
<p>hidegrid: false,</p>
<p>shrinkToFit: true,</p>
<p>scroll: true,</p>
<p>altRows: true,</p>
<p>altclass: &#39;odd&#39; + tblName,</p>
<p>toolbar: [true, &#39;both&#39;],</p>
<p>footerrow: false,</p>
<p>height: gridHeight,</p>
<p>caption: caption</p>
<p>}).jqGrid(&#39;navGrid&#39;, &#39;#&#39; + pagerID, { add: false, edit: false, view: false, del: false, refresh: false, search: false })</p>
<p>.navButtonAdd(&#39;#&#39; + pagerID,</p>
<p>{</p>
<p>caption: "Add&#38;nbsp;&#38;nbsp;",</p>
<p>buttonicon: "ui-icon-add",</p>
<p>onClickButton: function() {</p>
<p>var itemArray = "{";</p>
<p>for (var i = 0; i &#60; cols.length; i++) {</p>
<p>if (cols[i].toLowerCase() == "id") {</p>
<p>itemArray += cols[i] + ":&#39;-1&#39;,";</p>
<p>}</p>
<p>else</p>
<p>itemArray += cols[i] + ":&#39;&#39;,";</p>
<p>}</p>
<p>//remove last comma from itemArray</p>
<p>itemArray = itemArray.substring(0, itemArray.length - 1);</p>
<p>var total = grid.getGridParam(&#39;records&#39;);</p>
<p>grid.addRowData(-1, itemArray, &#39;last&#39;); // add a new row with empty data</p>
<p>lastSel = -1;</p>
<p>grid.jqGrid(&#39;editRow&#39;, -1, true);</p>
<p>//jQuery("#grid_id").jqGrid(&#39;editRow&#39;,rowid, keys, oneditfunc, succesfunc, url, extraparam, aftersavefunc,errorfunc, afterrestorefunc);</p>
<p>},</p>
<p>position: "last",</p>
<p>cursor: "pointer"</p>
<p>})</p>
<p>.navButtonAdd(&#39;#&#39; + pagerID,</p>
<p>{</p>
<p>caption: " Del",</p>
<p>buttonicon: "ui-icon-del",</p>
<p>onClickButton: function(id) {</p>
<p>alert("Deleting Row: " + lastSel)</p>
<p>//put ajax call in here to delete the row - LastSel gives the row keyname</p>
<p>},</p>
<p>position: "last",</p>
<p>cursor: "pointer"</p>
<p>});</p>
<p>});//document.ready</p>
<p><span style="font-size: x-small;">*********************************************************************</span></p>
<p><span style="font-size: x-small;">The Add button works, but I get and error 500 from the webservice when I try to save the insert.&#160; Because the buttons do not work in FireFox I can&#39;t use Firebug to figure out what is being sent.&#160; As you can tell, I am a complete newbie to both jQuery and jqGrid, so thanks for the help on this.</span></p>
<p><span style="font-size: x-small;">Geoff</span></p></p>
]]></description>
        	        	<pubDate>Thu, 23 Dec 2010 20:59:32 +0200</pubDate>
        </item>
</channel>
</rss>