<?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: delete a row - predefined formatter</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/delete-a-row-predefined-formatter</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/delete-a-row-predefined-formatter/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>wyattbiker on delete a row - predefined formatter</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delete-a-row-predefined-formatter#p24125</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delete-a-row-predefined-formatter#p24125</guid>
        	        	<description><![CDATA[<blockquote>
<p>dhoover said:are there any COMPLETE working examples of this that I can download from somewhere. I love jqGrid, but the documentation could be better.</p>
</blockquote>
<hr />
<p>You can set a column formatter like this (just hard code a value in your XML). You can then in your function add the row ID to execute the action.:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit833' value='Select Code' data-codeid='sfcode833' /></p>
<div class='sfcode' id='sfcode833'>{name: &#39;actions&#39;, index: &#39;actions&#39;, &#160;title:false, align:&#39;center&#39;, width:50, formatter: imageButton}</div>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5353' value='Select Code' data-codeid='sfcode5353' /></p>
<div class='sfcode' id='sfcode5353'>
<p>function imageButton (cellvalue, options, rowObject){</p>
<p>&#160; &#160; &#160;cv=cellvalue;</p>
<p>&#160; &#160; &#160;cellvalue=&#39;&#60;a onclick=&#34;alert(\&#39;Delete &#160;&#39;+cv+&#39; &#160;\&#39; );&#160;return false;&#34;&#62;&#60;img class=&#34;ui-icon ui-icon-trash&#34; title=&#34;Delete&#34; style=&#34;float:left&#34;/&#62;&#60;/a&#62;&#39;;</p>
<p>&#160; &#160; &#160; return cellvalue;</p>
</div>
<p>}</p>
]]></description>
        	        	<pubDate>Tue, 02 Aug 2011 02:16:26 +0300</pubDate>
        </item>
        <item>
        	<title>dhoover on delete a row - predefined formatter</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delete-a-row-predefined-formatter#p24108</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delete-a-row-predefined-formatter#p24108</guid>
        	        	<description><![CDATA[<p>are there any COMPLETE working examples of this that I can download from somewhere. I love jqGrid, but the documentation could be better.</p>
]]></description>
        	        	<pubDate>Sat, 30 Jul 2011 20:56:29 +0300</pubDate>
        </item>
        <item>
        	<title>dhoover on delete a row - predefined formatter</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/delete-a-row-predefined-formatter#p24106</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/delete-a-row-predefined-formatter#p24106</guid>
        	        	<description><![CDATA[<p>I may as well be new to jqGrid, since this is the first time I&#39;ve used it in 2 years! Anyway, I am attempting to construct a grid with a delete icon in the first column of each row, no editing is allowed, just delete. In the examples under predefined formatter I saw a grid similar to what I want to do, except that it also allowed editing. I get it to paint correctly, but I really do not understand what I need to do to make the delete operation actually do the right thing. When I watch what goes on in firebug, I see it fires off an http request to ajax.php with no parameters. I guess I am somehow supposed to provide that, but I really do not know how to do it. At minimum, I would like to provide an operation (delete) and a row id, so I can have the server code take care of the deletion. Anyway, what follows is the code. If someone could enlighten me, I would appreciate it.</p>
<p>jQuery(document).ready(function() {<br />&#160;&#160;&#160;&#160; jQuery("#list1").jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url:&#39;ajax.php&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype:"xml",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames:[&#39; &#39;, &#39;Keyword&#39;,&#39;Competition&#39;,&#39;Searches&#39;,&#39;CPC&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colModel:[<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;myac&#39;, width:25, fixed: true, sortable:false,resize:false,formatter:&#39;actions&#39;,formatoptions:{editbutton:false,delbutton:true}},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;keyword&#39;,index:&#39;keyword&#39;, width:300},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;competition&#39;,index:&#39;competition&#39;, width:80, align:&#39;right&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;searches&#39;,index:&#39;searches&#39;, width:70, align:&#39;right&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;cpc&#39;,index:&#39;cpc&#39;, width:40, align:&#39;right&#39;}<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowNum:10,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; autowidth:false,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowList:[10,20,30],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager:jQuery(&#39;#pager1&#39;),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname:&#39;id&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortorder:"desc",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption:"XML Example",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; editurl: &#39;ajax.php&#39;<br />&#160;&#160;&#160;&#160; }).navGrid(&#39;#pager1&#39;,{edit:false,add:false,del:false});<br />&#160;});</p>
]]></description>
        	        	<pubDate>Sat, 30 Jul 2011 03:46:07 +0300</pubDate>
        </item>
</channel>
</rss>