<?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: Add edit icon to ClientSide data array</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/add-edit-icon-to-clientside-data-array</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/add-edit-icon-to-clientside-data-array/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>sagana on Add edit icon to ClientSide data array</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/add-edit-icon-to-clientside-data-array#p8847</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/add-edit-icon-to-clientside-data-array#p8847</guid>
        	        	<description><![CDATA[<p>act: be+"&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;"+se,&#160;&#160;&#160; works although I see no reason why the single quote didn&#39;t.</p>
]]></description>
        	        	<pubDate>Thu, 20 Aug 2009 19:02:22 +0300</pubDate>
        </item>
        <item>
        	<title>sagana on Add edit icon to ClientSide data array</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/add-edit-icon-to-clientside-data-array#p8830</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/add-edit-icon-to-clientside-data-array#p8830</guid>
        	        	<description><![CDATA[<p>I want Edit and Delete icons in each row of the grid. I have this working when the data is returned from MySQL using json but not when the data is in a clientside array. Using the loadComplete method, nothing displays in the &#39;Actions&#39; column. Creating the icons in the relevant column in each line of the array displays the icons correctly but halts the programme and does nothing when they are clicked on. Code as follows:-</p>
</p>
<p>jQuery(document).ready(function(){ <br />&#160;&#160; &#160;jQuery("#trlist").jqGrid({<br />&#160;&#160; &#160;&#160;&#160; &#160;datatype: &#39;clientSide&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;colNames:[&#39;Actions&#39;,&#39;Row&#39;,&#39;Date&#39;, &#39;Acc to Dr&#39;,&#39;Acc to Cr&#39;,&#39;Reference&#39;,&#39;Amount&#39;,&#39;Tax&#39;,&#39;Description&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;colModel :[ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;act&#39;,index:&#39;act&#39;, width:50,sortable:false}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;id&#39;,index:&#39;id&#39;, key:true, width:55, sorttype:&#39;int&#39;}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;ddate&#39;,index:&#39;ddate&#39;, width:90, sorttype:&#39;date&#39;, datefmt:&#39;d-m-Y&#39;}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;acc2dr&#39;,index:&#39;acc2dr&#39;, width:180,sortable:false}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;acc2cr&#39;,index:&#39;acc2cr&#39;, width:180,sortable:false}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;ref&#39;,index:&#39;ref&#39;, width:70}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;amount&#39;,index:&#39;amount&#39;, width:60,align:&#39;right&#39;,sortable:false}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;tax&#39;,index:&#39;tax&#39;, width:60,align:&#39;right&#39;, sortable:false},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;descript&#39;,index:&#39;descript&#39;, width:180, sortable:false}<br />&#160;&#160; &#160;&#160;&#160; &#160;],<br />&#160;&#160; &#160;&#160;&#160; &#160;pager: jQuery(&#39;#trpager&#39;),<br />&#160;&#160; &#160;&#160;&#160; &#160;rowNum:10,<br />&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;imgpath: &#39;../includes/jqgrid/themes/coffee/images&#39;<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;}); <br />});</p>
<p>Code here populates the required variables, then:-</p>
<p>&#160;&#160;&#160; l_id++;<br />&#160;&#160; &#160;var be = &#39;&#60;img src="../images/edit.png" title="Edit" onclick="javascript:edittr(&#39;+l_id+&#39;)" &#62;&#39;; <br />&#160;&#160; &#160;var se = &#39;&#60;img src="../images/delete.png" title="Delete" onclick="javascript:deltr(&#39;+l_id+&#39;)" &#62;&#39;; </p>
<p>&#160;&#160; &#160;var line2add = {<br />&#160;&#160; &#160;&#160;&#160; &#160;act: be+&#39;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#39;+se,&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;id: l_id,<br />&#160;&#160; &#160;&#160;&#160; &#160;ddate: ddate,<br />&#160;&#160; &#160;&#160;&#160; &#160;acc2dr: a2dr, &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;acc2cr: a2cr, &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;ref: reference,<br />&#160;&#160; &#160;&#160;&#160; &#160;amount: amount,<br />&#160;&#160; &#160;&#160;&#160; &#160;tax: tax,<br />&#160;&#160; &#160;&#160;&#160; &#160;descript: description}<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;jQuery("#trlist").addRowData(l_id,line2add,"first");</p>
<p>The rest of each row in the grid looks fine. I would appreciate any assistance on this.</p>
]]></description>
        	        	<pubDate>Wed, 19 Aug 2009 21:48:07 +0300</pubDate>
        </item>
</channel>
</rss>