<?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: jqgrid with drupal</title>
	<link>http://www.trirand.com/blog/?page_id=393/jqgrid-roadmap/jqgrid-with-drupal</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/jqgrid-roadmap/jqgrid-with-drupal/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>m2jalali on jqgrid with drupal</title>
        	<link>http://www.trirand.com/blog/?page_id=393/jqgrid-roadmap/jqgrid-with-drupal#p23973</link>
        	<category>jqGrid Roadmap</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/jqgrid-roadmap/jqgrid-with-drupal#p23973</guid>
        	        	<description><![CDATA[<p>there was an error<br />I create new module : milkshake I want this menu show my table node </p>
<p><input type='button' class='sfcodeselect' name='sfselectit5468' value='Select Code' data-codeid='sfcode5468' /></p>
<div class='sfcode' id='sfcode5468'>function milkshake_list($type) {<br />$output = t(&#39;This page contains our example form.&#39;).&#39;&#60;br&#62;&#39;;<br />require_once "sites/all/libraries/jqgrid/jq-config.php";<br />require_once "sites/all/libraries/jqgrid/php/jqGrid.php";<br />require_once "sites/all/libraries/jqgrid/php/jqGridPdo.php"; <br />$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);<br />$conn-&#62;query("SET NAMES utf8");<br />// Create the jqGrid instance<br />$grid = new jqGridRender($conn);<br />$grid-&#62;debug = true;<br />$grid-&#62;showError = true;<br />//$grid-&#62;logtofile = false;</p>
<p>$grid-&#62;SelectCommand = &#39;SELECT * FROM node&#39;;<br />// set the ouput format to json<br />$grid-&#62;dataType = &#39;json&#39;;<br />// Let the grid create the model</p>
<p>$grid-&#62;table = &#39;node&#39;;<br />$grid-&#62;setPrimaryKeyId(&#39;nid&#39;);<br />$grid-&#62;serialKey = false;</p>
<p>$grid-&#62;setColModel();<br />// Set the url from where we obtain the data<br />$grid-&#62;setUrl(&#39;/list/fruity&#39;);<br />// Set grid caption using the option caption</p>
<p>$grid-&#62;setGridOptions(array(<br />"caption"=&#62;"Drupal Node Table",<br />"rownumbers"=&#62;true,<br />"rownumWidth"=&#62;35,<br />"rowNum"=&#62;10,<br />"sortname"=&#62;"nid",<br />"hoverrows"=&#62;true,<br />"rowList"=&#62;array(10,20,50),<br />"width"=&#62;700,<br />"height"=&#62;240,<br />));</p>
<p>if (arg(1) == 1) {<br />$output .= $grid-&#62;renderGrid("#grid","#pager",true,null,null,true,true,true);<br />} else {<br />$output .= $grid-&#62;renderGrid("#grid","#pager",true,null,null,true,true,false);<br />}<br />$output.=&#39;&#60;hr&#62;&#39;.t(&#39;List @type flavors&#39;, array(&#39;@type&#39; =&#62; $type)).$grid-&#62;showError ;<br />$conn = null; <br />return $output;<br />}</p>
</div>
<p>in jq-config</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9622' value='Select Code' data-codeid='sfcode9622' /></p>
<div class='sfcode' id='sfcode9622'>&#60;?php<br />// ** MySQL settings ** //<br />//define(&#39;DB_NAME&#39;, &#39;northwind&#39;);&#160;&#160;&#160; // The name of the database<br />//define(&#39;DB_HOST&#39;, &#39;localhost&#39;);&#160;&#160;&#160; // 99% chance you won&#39;t need to change this value<br />define(&#39;DB_DSN&#39;,&#39;mysql:host=localhost;dbname=conch&#39;);<br />define(&#39;DB_USER&#39;, &#39;root&#39;);&#160;&#160;&#160;&#160; // Your MySQL username<br />define(&#39;DB_PASSWORD&#39;, &#39;&#39;); // ...and password</p>
<p>define(&#39;ABSPATH&#39;, dirname(__FILE__).&#39;/&#39;);<br />//require_once(ABSPATH.&#39;tabs.php&#39;);<br />?&#62;</p>
</div>
<p>output there was an error $grid-&#62;showError=1<br />How Do i correct...?<br />Please guide me</p>
]]></description>
        	        	<pubDate>Sun, 17 Jul 2011 15:42:11 +0300</pubDate>
        </item>
</channel>
</rss>