<?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 there is the same data loading on all page</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/help-there-is-the-same-data-loading-on-all-page</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-there-is-the-same-data-loading-on-all-page/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tifischer on Help there is the same data loading on all page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-there-is-the-same-data-loading-on-all-page#p30707</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-there-is-the-same-data-loading-on-all-page#p30707</guid>
        	        	<description><![CDATA[<p>I noticed that I get different results if I use response or responce.Â  I noticed that there is some discontinuity in the source code when I searched for response and responce I found results for both.Â  I attempted to change all to one or the other but neither work.Â  With responce I get many pages but all the same results on each page.Â  With response I get only one page with results.Â  Please advise as to how to solve this problem.Â </p>
<p>Â </p>
<p>Blessings,</p>
<p>Tiffany</p>
]]></description>
        	        	<pubDate>Fri, 30 May 2014 18:14:48 +0300</pubDate>
        </item>
        <item>
        	<title>tifischer on Help there is the same data loading on all page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-there-is-the-same-data-loading-on-all-page#p30696</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-there-is-the-same-data-loading-on-all-page#p30696</guid>
        	        	<description><![CDATA[<p>I recently installed the 4.6.0 and I can see my data but the data is showing the same for all pages.Â  If I increase the number of rows when I load I see the data fro all those rows but when I go to the next page it is still the same data.Â  Please let me know how to correct the problem that the same data is displaying on all pages.Â </p>
<p>server-update.php :</p>
<p><span style="color: #3366ff">[code]</span></p>
<p><span style="color: #3366ff">$page = $_GET['page']; // get the requested page </span><br />
 <span style="color: #3366ff">$limit = $_GET['rows']; // get how many rows we want to have into the grid </span><br />
 <span style="color: #3366ff">$sidx = $_GET['sidx']; // get index row - i.e. user click to sort </span><br />
 <span style="color: #3366ff">$sord = $_GET['sord']; // get the direction </span><br />
 <span style="color: #3366ff">if(!$sidx) $sidx =1; // connect to the database</span></p>
<p><span style="color: #3366ff">$db = mysql_connect($dbhost, $dbuser, $dbpass) or die("Connection Error: " . mysql_error()); </span><br />
 <span style="color: #3366ff">mysql_select_db($database) or die("Error conecting to db.");</span></p>
<p><span style="color: #3366ff">$result = mysql_query("SELECT COUNT(*) AS count FROM persons a INNER JOIN addresses b ON b.personID=a.personID WHERE a.isActive=1 ");</span></p>
<p><span style="color: #3366ff">$row = mysql_fetch_array($result,MYSQL_ASSOC); </span><br />
 <span style="color: #3366ff">$count = $row['count'];</span><br />
 <span style="color: #3366ff"> if( $count &#62;0 ) { $total_pages = ceil($count/$limit); </span><br />
 <span style="color: #3366ff"> } else { $total_pages = 0; } </span><br />
 <span style="color: #3366ff"> if ($page &#62; $total_pages) $page=$total_pages; </span><br />
 <span style="color: #3366ff"> $start = $limit*$page - $limit; // do not put $limit*($page - 1) </span></p>
<p><span style="color: #3366ff"> $SQL = "SELECT * FROM persons a INNER JOIN addresses b ON b.personID=a.personID WHERE 1=1 AND a.isActive=1 ORDER BY $sidx $sord limit $limit"; </span><br />
 <span style="color: #3366ff">$result = mysql_query( $SQL ) or die("Couldn t execute query. $SQL".mysql_error());</span></p>
<p><span style="color: #3366ff">$responce-&#62;page = $page; </span><br />
 <span style="color: #3366ff"> $responce-&#62;total = $total_pages; </span><br />
 <span style="color: #3366ff"> $responce-&#62;records = $count; </span></p>
<p><span style="color: #3366ff"> $rowCount=0; </span></p>
<p><span style="color: #3366ff"> while($row = mysql_fetch_array($result,MYSQL_ASSOC)) { </span></p>
<p><span style="color: #3366ff">...</span></p>
<p><span style="color: #3366ff"> if ($tmpPersonType==0) $personType = "Related";</span><br />
 <span style="color: #3366ff"> if ($tmpPersonType==1) $personType = "Student";</span><br />
 <span style="color: #3366ff"> if ($tmpPersonType==2) $personType = "Instructor";</span><br />
 <span style="color: #3366ff"> if ($tmpPersonType==3) $personType = "Business";</span></p>
<p><span style="color: #3366ff"> $responce-&#62;rows[$rowCount]['id']=$row[personID]; </span><br />
 <span style="color: #3366ff"> $responce-&#62;rows[$rowCount]['cell']=array($row[personID],$personType,$row[firstName],$row[lastName],$row[emailAddress],$tmpPhone,$row[address],$tmpCustom,$tmpRegistrations,$newBalance);</span></p>
<p><span style="color: #3366ff"> $rowCount++;</span></p>
<p><span style="color: #3366ff">...</span></p>
<p><span style="color: #3366ff">}</span></p>
<p>echo json_encode($responce);</p>
<p><span style="color: #3366ff">[code]</span></p>
<p>Â </p>
<p>person_search-update.php:</p>
<p><span style="color: #3366ff">[code]</span></p>
<p><span style="color: #3366ff">&#60;link rel="stylesheet" type="text/css" media="screen" href="jqgrid_420/themes/redmond/jquery-ui-custom.css" /&#62;</span><br />
 <span style="color: #3366ff"> &#60;link rel="stylesheet" type="text/css" media="screen" href="jqgrid_420/themes/ui.jqgrid.css" /&#62;</span><br />
 <span style="color: #3366ff"> &#60;link rel="stylesheet" type="text/css" media="screen" href="jqgrid_420/themes/ui.multiselect.css" /&#62;</span><br />
 <span style="color: #3366ff"> &#60;style type="text"&#62;</span><br />
 <span style="color: #3366ff"> html, body {</span><br />
 <span style="color: #3366ff"> margin: 0; /* Remove body margin/padding */</span><br />
 <span style="color: #3366ff"> padding: 0;</span><br />
 <span style="color: #3366ff"> overflow: hidden; /* Remove scroll bars on browser window */</span><br />
 <span style="color: #3366ff"> font-size: 75%;</span><br />
 <span style="color: #3366ff"> }</span><br />
 <span style="color: #3366ff"> &#60;/style&#62;</span><br />
 <span style="color: #3366ff"> &#60;script src="jqgrid_420/js/jquery.js" type="text/javascript"&#62;&#60;/script&#62;</span><br />
 <span style="color: #3366ff"> &#60;script src="jqgrid_420/js/i18n/grid.locale-en.js" type="text/javascript"&#62;&#60;/script&#62;</span><br />
 <span style="color: #3366ff"> &#60;script type="text/javascript"&#62;</span><br />
 <span style="color: #3366ff"> $.jgrid.no_legacy_api = true;</span><br />
 <span style="color: #3366ff"> $.jgrid.useJSON = true;</span><br />
 <span style="color: #3366ff"> &#60;/script&#62;</span><br />
 <span style="color: #3366ff"> &#60;script src="jqgrid_420/js/jquery.jqGrid.js" type="text/javascript"&#62;&#60;/script&#62;</span><br />
 <span style="color: #3366ff"> &#60;script src="jqgrid_420/js/grid.pivot.js" type="text/javascript"&#62;&#60;/script&#62;</span><br />
 <span style="color: #3366ff"> &#60;script src="jqgrid_420/js/jquery-ui-custom.min.js" type="text/javascript"&#62;&#60;/script&#62;</span></p>
<p><span style="color: #3366ff">&#60;script type="text/javascript"&#62;</span><br />
 <span style="color: #3366ff"> jQuery(document).ready(function(){</span></p>
<p><span style="color: #3366ff">var template1 = { "groupOp": "AND", "rules": [ { "field": "a.firstName", "op": "bw", "data": "Client 1" },</span><br />
 <span style="color: #3366ff"> { "field": "a.lastName", "op": "gt", "data": "20"} ] };</span></p>
<p><span style="color: #3366ff">jQuery("#person_list").jqGrid({</span><br />
 <span style="color: #3366ff"> url:'server-update.php?q=2',</span><br />
 <span style="color: #3366ff"> datatype: "json",</span><br />
 <span style="color: #3366ff"> colNames:['ID','Type','Last','First','Email','Phone','Address','Custom','Registrations','Balance'],</span><br />
 <span style="color: #3366ff"> colModel:[</span><br />
 <span style="color: #3366ff"> {name:'id',index:'a.personID', width:20},</span><br />
 <span style="color: #3366ff"> {name:'Type', index:'isStudent', sortable:true, width:25},</span><br />
 <span style="color: #3366ff"> {name:'Last', index:'a.lastName', width:40},</span><br />
 <span style="color: #3366ff"> {name:'First', index:'a.firstName', width:30},</span><br />
 <span style="color: #3366ff"> {name:'Email', sortable:true, index:'a.emailAddress', width:60,searchoptions:{sopt:['bw','cn','eq','ne','lt','gt','ew']}},</span><br />
 <span style="color: #3366ff"> {name:'Phone', sortable:false,index:'phone', width:35},</span><br />
 <span style="color: #3366ff"> {name:'Address', sortable:false,index:'address', width:100},</span><br />
 <span style="color: #3366ff"> {name:'Custom', sortable:false,search:false, hidden:false, index:'custom', width:30},</span><br />
 <span style="color: #3366ff"> {name:'Registrations', sortable:false,search:false, hidden:false, index:'programCode', width:100},</span><br />
 <span style="color: #3366ff"> {name:'Balance', sortable:false,search:false, hidden:false,align:"right", index:'balance', width:40} //CN change 30 to 40</span><br />
 <span style="color: #3366ff"> ],</span><br />
 <span style="color: #3366ff"> rowNum:10,</span><br />
 <span style="color: #3366ff"> width:700,</span><br />
 <span style="color: #3366ff"> height: '100%',</span><br />
 <span style="color: #3366ff"> pager: '#pagerb',</span><br />
 <span style="color: #3366ff"> sortname: 'lastName',</span><br />
 <span style="color: #3366ff"> rowList:[10,20,50],</span><br />
 <span style="color: #3366ff"> viewrecords: true,</span><br />
 <span style="color: #3366ff"> sortorder: "asc",</span><br />
 <span style="color: #3366ff"> caption: "",</span></p>
<p><span style="color: #3366ff">});</span></p>
<p><span style="color: #3366ff">jQuery("#person_list").jqGrid('navGrid','#pagerb', {</span><br />
 <span style="color: #3366ff"> edit:false,</span><br />
 <span style="color: #3366ff"> add:false,</span><br />
 <span style="color: #3366ff"> del:false},</span><br />
 <span style="color: #3366ff"> {}, {}, {},</span><br />
 <span style="color: #3366ff"> { multipleSearch:true, multipleGroup:false, showQuery: false,</span><br />
 <span style="color: #3366ff"> // set the names of the template</span><br />
 <span style="color: #3366ff"> "tmplNames" : ["Template One"],</span><br />
 <span style="color: #3366ff"> // set the template contents</span><br />
 <span style="color: #3366ff"> "tmplFilters": [template1] } );</span></p>
<p><span style="color: #3366ff">});</span></p>
<p><span style="color: #3366ff">&#60;/script&#62;</span></p>
<p><span style="color: #3366ff">[/code]</span></p>
<p>Also how can I get your forum to not dump the formatting when I past my code and save?</p>
<p>Â </p>
<p>Blessings,</p>
<p>Tiffany</p>
]]></description>
        	        	<pubDate>Thu, 29 May 2014 17:57:58 +0300</pubDate>
        </item>
</channel>
</rss>