<?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: Multiselect delete rows not working</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/multiselect-delete-rows-not-working</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/multiselect-delete-rows-not-working/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>sagana on Multiselect delete rows not working</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/multiselect-delete-rows-not-working#p21088</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/multiselect-delete-rows-not-working#p21088</guid>
        	        	<description><![CDATA[<p>The following code is not deleting the selected entries. What am I doing wrong, please.</p>
<p>
require_once &#39;../includes/jquery/jq-config.php&#39;;<br />// include the jqGrid Class<br />require_once "../includes/jquery/php/jqGrid.php";<br />// include the PDO driver class<br />require_once "../includes/jquery/php/jqGridPdo.php";<br />// Connection to the server<br />$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);<br />// Tell the db that we use utf-8<br />$conn-&#62;query("SET NAMES utf8");</p>
<p>// Create the jqGrid instance<br />$grid = new jqGridRender($conn);<br />// Write the SQL Query<br />$grid-&#62;SelectCommand = "select lead_id,lastname,firstname,phone,concat_ws(&#39;, &#39;,streetno,street,suburb,town) as addr,ddate from ".$filterfile;</p>
<p>// Set the table to where you add the data<br />$grid-&#62;table = $filterfile; </p>
<p>$grid-&#62;setPrimaryKeyId(&#39;lead_id&#39;);</p>
<p>// set the ouput format to json<br />$grid-&#62;dataType = &#39;json&#39;;<br />// Let the grid create the model<br />$grid-&#62;setColModel();<br />// Set the url from where we obtain the data<br />$grid-&#62;setUrl(&#39;getaLeads.php&#39;);<br />// Set grid caption using the option caption<br />$grid-&#62;setGridOptions(array(<br />&#160;&#160;&#160; "caption"=&#62;"Leads",<br />&#160;&#160;&#160; "rowNum"=&#62;12,<br />&#160;&#160;&#160; "sortname"=&#62;"lastname",<br />&#160;&#160;&#160; "rowList"=&#62;array(12,30,50),<br />&#160;&#160; &#160;"multiselect"=&#62;true,<br />&#160;&#160; &#160;"height"=&#62;270,<br />&#160;&#160; &#160;"width"=&#62;1000<br />&#160;&#160;&#160; ));</p>
<p>// Change some property of the field(s)<br />$grid-&#62;setColProperty("lead_id", array("label"=&#62;"ID", "width"=&#62;20, "hidden"=&#62;true));<br />$grid-&#62;setColProperty("lastname", array("label"=&#62;"Last Name", "width"=&#62;190));<br />$grid-&#62;setColProperty("firstname", array("label"=&#62;"First Name", "width"=&#62;100));<br />$grid-&#62;setColProperty("phone", array("label"=&#62;"Phone", "width"=&#62;80));<br />$grid-&#62;setColProperty("addr", array("label"=&#62;"Address", "width"=&#62;250));<br />$grid-&#62;setColProperty("ddate", array("label"=&#62;"Date", "width"=&#62;100, "formatter"=&#62;"date"));</p>
<p>$dblclick = &#60;&#60;&#60;ONDOUBLECLICK<br />function(rowid) {<br />&#160;&#160; &#160;var rowdata = $("#aleadlist").getRowData(rowid);<br />&#160;&#160; &#160;var leadid = rowdata.lead_id;<br />&#160;&#160; &#160;viewlead(leadid);<br />}<br />ONDOUBLECLICK;<br />$grid-&#62;setGridEvent(&#39;ondblClickRow&#39;,$dblclick);</p>
<p>// enable form editing<br />$grid-&#62;navigator = true;<br />$grid-&#62;setNavOptions(&#39;navigator&#39;,array(&#39;add&#39;=&#62;false,&#39;edit&#39;=&#62;false));<br />$grid-&#62;setNavOptions(&#39;del&#39;,array("jqModal"=&#62;false));</p>
<p>// Run the script<br />$grid-&#62;renderGrid(&#39;#aleadlist&#39;,&#39;#aleadpager&#39;,true, null, null, true,true);</p>
]]></description>
        	        	<pubDate>Thu, 02 Dec 2010 22:05:22 +0200</pubDate>
        </item>
</channel>
</rss>