<?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: Another Missing Data in the Grid Problem</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/another-missing-data-in-the-grid-problem</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/another-missing-data-in-the-grid-problem/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>GeorgeIoak on Another Missing Data in the Grid Problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/another-missing-data-in-the-grid-problem#p24046</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/another-missing-data-in-the-grid-problem#p24046</guid>
        	        	<description><![CDATA[<p>Sorry guys, I found the problem. When I was initially trying to debug the code I had added an echo statement in the dbconnect.php file:</p>
</p>
<p>&#160;echo $SQL;</p>
</p>
<p>That statement was corrupting the XML output causing both the header error as well as the data not being parsed correctly.</p>
]]></description>
        	        	<pubDate>Sat, 23 Jul 2011 05:04:51 +0300</pubDate>
        </item>
        <item>
        	<title>GeorgeIoak on Another Missing Data in the Grid Problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/another-missing-data-in-the-grid-problem#p24045</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/another-missing-data-in-the-grid-problem#p24045</guid>
        	        	<description><![CDATA[</p>
<p>I&#39;ve been searching the forum trying to find some clues but I just can&#39;t seem to find the answer so hopefully someone will spot the problem. Here&#39;s my HTML code which is jusy slightly modified from the example:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6269' value='Select Code' data-codeid='sfcode6269' /></p>
<div class='sfcode' id='sfcode6269'>
<p>&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34; &#34;<a rel=&#34;nofollow&#34; href=&#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#34;&#62;&#038;quot; target="_blank"></a><a href="http://www.w3.org/TR/xhtml1/DT&#038;hellip" rel="nofollow" target="_blank"><a href="http://www.w3.org/TR/xhtml1/DT" rel="nofollow">http://www.w3.org/TR/xhtml1/DT</a>.....038;hellip</a>;..&#34;&#62;<br />&#60;html xmlns=&#34;<a rel=&#34;nofollow&#34; href=&#34;http://www.w3.org/1999/xhtml&#038;quot&#038;quot; target="_blank"></a><a href="http://www.w3.org/1999/xhtml&#038;quot" rel="nofollow" target="_blank">http://www.w3.org/1999/xhtml&#038;quot</a>; xml:lang=&#34;en&#34; lang=&#34;en&#34;&#62;<br />&#60;head&#62;<br />&#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; /&#62;<br />&#60;title&#62;My First Grid&#60;/title&#62;<br />&#160;<br />&#60;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; media=&#34;screen&#34; href=&#34;css/cupertino/jquery-ui-1.8.14.custom.css&#34; /&#62;<br />&#60;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; media=&#34;screen&#34; href=&#34;css/ui.jqgrid.css&#34; /&#62;<br />&#160;<br />&#160;&#60;style&#62;<br />html, body {<br />&#160;&#160;&#160; margin: 0;<br />&#160;&#160;&#160; padding: 0;<br />&#160;&#160;&#160; font-size: 75%;<br />}<br />&#60;/style&#62;<br />&#160;<br />&#60;script src=&#34;js/jquery-1.5.2.min.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;<br />&#60;script src=&#34;js/i18n/grid.locale-en.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;<br />&#60;script src=&#34;js/jquery.jqGrid.min.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;<br />&#160; <br />&#60;script type=&#34;text/javascript&#34;&#62;<br />jQuery(document).ready(function(){ <br />&#160;&#160; &#160;jQuery(&#34;#list&#34;).jqGrid({<br />&#160;&#160;&#160; url:&#39;dbconnect.php?q=1&#39;,<br />&#160;&#160;&#160; datatype: &#39;xml&#39;,<br />&#160;&#160;&#160; mtype: &#39;GET&#39;,<br />&#160;&#160; &#160;colNames:[&#39;ID&#39;, &#39;Title&#39;, &#39;Org. Name&#39;, &#39;First Name&#39;, &#39;Last Name&#39;, &#39;Address&#39;, &#39;City&#39;, &#39;State&#39;, &#39;Zipcode&#39;, &#39;Home Phone&#39;, &#39;Work Phone&#39;, &#39;Email&#39;],<br />&#160;&#160;&#160; colModel :[ <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;id&#39;, index:&#39;id&#39;, width:15},<br />&#160;&#160; &#160;&#160; {name:&#39;title&#39;, index:&#39;title&#39;, width:55}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;orgname&#39;, index:&#39;orgname&#39;, width:100}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;fname&#39;, index:&#39;fname&#39;, width:80, align:&#39;right&#39;}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;lname&#39;, index:&#39;lname&#39;, width:100, align:&#39;right&#39;}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;address&#39;, index:&#39;address&#39;, width:120, align:&#39;right&#39;}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;city&#39;, index:&#39;city&#39;, width:80,},<br />&#160;&#160; &#160;&#160; {name:&#39;state&#39;, index:&#39;state&#39;, width:40,},<br />&#160;&#160; &#160;&#160; {name:&#39;zipcode&#39;, index:&#39;zipcode&#39;, width:50,},<br />&#160;&#160; &#160;&#160; {name:&#39;homephone&#39;, index:&#39;homephone&#39;, width:80,},<br />&#160;&#160; &#160;&#160; {name:&#39;workphone&#39;, index:&#39;workphone&#39;, width:80,},<br />&#160;&#160; &#160;&#160; {name:&#39;email&#39;, index:&#39;email&#39;, width:100,}<br />&#160;&#160;&#160; ],<br />&#160;&#160;&#160; pager: &#39;#pager&#39;,<br />&#160;&#160;&#160; rowNum:10,<br />&#160;&#160;&#160; rowList:[10,20,30],<br />&#160;&#160;&#160; sortname: &#39;lname&#39;,<br />&#160;&#160;&#160; sortorder: &#39;desc&#39;,<br />&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160; gridview: true,<br />&#160;&#160;&#160; caption: &#39;My first grid&#39;<br />&#160; }); <br />}); <br />&#60;/script&#62;<br />&#160;<br />&#60;/head&#62;<br />&#60;body&#62;<br />&#60;table id=&#34;list&#34;&#62;&#60;tr&#62;&#60;td/&#62;&#60;/tr&#62;&#60;/table&#62; <br />&#60;div id=&#34;pager&#34;&#62;&#60;/div&#62; <br />&#60;/body&#62;<br />&#60;/html&#62;</p>
</div>
<p>I&#39;m using FireBug to decode the problems and it appears that the XML is getting data and in the proper format however I&#39;m getting this error in the reponse before the actual XML code:</p>
</p>
<p style="padding-left: 30px;">&#60;b&#62;Warning&#60;/b&#62;:&#160; Cannot modify header information &#8211; headers already sent by (output started at /home/mydomainname/public_html/db/jqGrid/dbconnect.php:51) in &#60;b&#62;/home/mydomainname/public_html/db/jqGrid/dbconnect.php&#60;/b&#62; on line &#60;b&#62;56&#60;/b&#62;&#60;br /&#62;</p>
<p style="padding-left: 30px;">&#160;</p>
<p style="padding-left: 30px;">the end of my dbconnect.php file is:</p>
<p style="padding-left: 30px;">&#160;</p>
<p style="padding-left: 30px;">&#160;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6355' value='Select Code' data-codeid='sfcode6355' /></p>
<div class='sfcode' id='sfcode6355'>$SQL = &#34;SELECT &#34;. $dbcolumns. &#34;FROM &#34;. $dbtable. &#34; ORDER BY &#34;.$sidx.&#34; &#34;.$sord.&#34; LIMIT &#34;.$start.&#34; , &#34;.$limit; <br />&#160;&#160; &#160;&#160;&#160; &#160;echo $SQL;<br />&#160;&#160; &#160;&#160;&#160; &#160;$result = mysql_query( $SQL ) or die(&#34;Couldn&#39;t execute query.&#34;.mysql_error()); <br />&#160;&#160; &#160;&#160;&#160; &#160; <br />&#160;&#160; &#160;&#160;&#160; &#160;if ( stristr($_SERVER[&#34;HTTP_ACCEPT&#34;],&#34;application/xhtml+xml&#34;) ) {<br />&#160;&#160; &#160;&#160;&#160; &#160;header(&#34;Content-type: application/xhtml+xml;charset=utf-8&#34;); } else {<br />&#160;&#160; &#160;&#160;&#160; &#160;header(&#34;Content-type: text/xml;charset=utf-8&#34;);<br />&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;$et = &#34;&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;$s = &#34;&#60;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;$s .=&#160; &#34;&#60;rows&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;page&#62;&#34;.$page.&#34;&#60;/page&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;total&#62;&#34;.$total_pages.&#34;&#60;/total&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;records&#62;&#34;.$count.&#34;&#60;/records&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; $s .= &#34;&#60;row id=&#39;&#34;. $row[&#39;id&#39;].&#34;&#39;&#62;&#34;;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#34;. $row[&#39;title&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#34;. $row[&#39;orgname&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#34;. $row[&#39;fname&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#34;. $row[&#39;lname&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#34;. $row[&#39;address&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#34;. $row[&#39;city&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#34;. $row[&#39;state&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#34;. $row[&#39;zipcode&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#34;. $row[&#39;homephone&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#34;. $row[&#39;workphone&#39;].&#34;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;cell&#62;&#60;![CDATA[&#34;. $row[&#39;email&#39;].&#34;]]&#62;&#60;/cell&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;/row&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;$s .= &#34;&#60;/rows&#62;&#34;; <br />&#160;&#160; &#160;&#160;&#160; &#160; <br />&#160;&#160; &#160;&#160;&#160; &#160;echo $s;</p>
<p>?&#62;</p>
</div>
<p style="padding-left: 30px;">and finally the XML response (note that I changed some data to protect some information)</p>
<p style="padding-left: 30px;">&#160;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit342' value='Select Code' data-codeid='sfcode342' /></p>
<div class='sfcode' id='sfcode342'>
<p style=&#34;&#34;padding-left:&#34;>&#160;</p>
<p style=&#34;&#34;padding-left:&#34;>SELECT id, title, orgname, fname, lname, address, city, state, zipcode, homephone, workphone, email FROM MailingList ORDER BY lname desc LIMIT 0 , 10&#60;br /&#62;<br />&#60;b&#62;Warning&#60;/b&#62;:&#160; Cannot modify header information &#8211; headers already sent by (output started at /home/iotllcc1/public_html/db/jqGrid/dbconnect.php:51) in &#60;b&#62;/home/iotllcc1/public_html/db/jqGrid/dbconnect.php&#60;/b&#62; on line &#60;b&#62;56&#60;/b&#62;&#60;br /&#62;<br />&#60;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&#62;&#60;rows&#62;&#60;page&#62;1&#60;/page&#62;&#60;total&#62;1180&#60;/total&#62;&#60;records&#62;11793&#60;/records&#62;&#60;row id=&#39;1923&#39;&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;Deborah xxx&#60;/cell&#62;&#60;cell&#62;xxx&#60;/cell&#62;&#60;cell&#62;xxx West &#34;K&#34; Street&#60;/cell&#62;&#60;cell&#62;Benicia&#60;/cell&#62;&#60;cell&#62;CA&#60;/cell&#62;&#60;cell&#62;94510-&#160;&#160;&#160; &#60;/cell&#62;&#60;cell&#62;(707) 745-xxxx&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;![CDATA[]]&#62;&#60;/cell&#62;&#60;/row&#62;&#60;row id=&#39;6763&#39;&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;A&#60;/cell&#62;&#60;cell&#62;xxxx&#60;/cell&#62;&#60;cell&#62;451 xxxx Court&#60;/cell&#62;&#60;cell&#62;Benicia&#60;/cell&#62;&#60;cell&#62;CA&#60;/cell&#62;&#60;cell&#62;94510-&#160;&#160;&#160; &#60;/cell&#62;&#60;cell&#62;(707) 745-xxxx&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;![CDATA[]]&#62;&#60;/cell&#62;&#60;/row&#62;&#60;row id=&#39;11347&#39;&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;Lisa&#60;/cell&#62;&#60;cell&#62;xxxx&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;![CDATA[xxxx.xxxx@yahoo.com]]&#62;&#60;/cell&#62;&#60;/row&#62;&#60;row id=&#39;1024&#39;&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;Ann&#60;/cell&#62;&#60;cell&#62;xxxx&#60;/cell&#62;&#60;cell&#62;451 xxxxCourt&#60;/cell&#62;&#60;cell&#62;Benicia&#60;/cell&#62;&#60;cell&#62;CA&#60;/cell&#62;&#60;cell&#62;94510-&#160;&#160;&#160; &#60;/cell&#62;&#60;cell&#62;(707) 745-xxxx&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;![CDATA[xxxx@earthlink.com]]&#62;&#60;/cell&#62;&#60;/row&#62;&#60;row id=&#39;997&#39;&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;Betty&#60;/cell&#62;&#60;cell&#62;xxxx&#60;/cell&#62;&#60;cell&#62;1595 xxxxSt.&#60;/cell&#62;&#60;cell&#62;San Francisco&#60;/cell&#62;&#60;cell&#62;CA&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;(415) 775-xxxx&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;![CDATA[]]&#62;&#60;/cell&#62;&#60;/row&#62;&#60;row id=&#39;6948&#39;&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;Val&#60;/cell&#62;&#60;cell&#62;xxxx&#60;/cell&#62;&#60;cell&#62;1201 xxxxxxxxParkway #610&#60;/cell&#62;&#60;cell&#62;Vallejo&#60;/cell&#62;&#60;cell&#62;CA&#60;/cell&#62;&#60;cell&#62;94591-&#160;&#160;&#160; &#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;![CDATA[]]&#62;&#60;/cell&#62;&#60;/row&#62;&#60;row id=&#39;3789&#39;&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;Val&#60;/cell&#62;&#60;cell&#62;xxxx&#60;/cell&#62;&#60;cell&#62;xxxx Glen Cove Parkway #xxxx&#60;/cell&#62;&#60;cell&#62;Vallejo&#60;/cell&#62;&#60;cell&#62;CA&#60;/cell&#62;&#60;cell&#62;94589-&#160;&#160;&#160; &#60;/cell&#62;&#60;cell&#62;(707) 557-xxxx&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;![CDATA[xxxx@yahoo.com]]&#62;&#60;/cell&#62;&#60;/row&#62;&#60;row id=&#39;7946&#39;&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;xxxx&#60;/cell&#62;&#60;cell&#62;xxxxxxxxRoad #27&#60;/cell&#62;&#60;cell&#62;Benicia&#60;/cell&#62;&#60;cell&#62;CA&#60;/cell&#62;&#60;cell&#62;94510-&#160;&#160;&#160; &#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;![CDATA[]]&#62;&#60;/cell&#62;&#60;/row&#62;&#60;row id=&#39;6462&#39;&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;Charles&#60;/cell&#62;&#60;cell&#62;xxxx&#60;/cell&#62;&#60;cell&#62;xxxxxxxxRoad Apt 27&#60;/cell&#62;&#60;cell&#62;Benicia&#60;/cell&#62;&#60;cell&#62;CA&#60;/cell&#62;&#60;cell&#62;94510-&#160;&#160;&#160; &#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;![CDATA[]]&#62;&#60;/cell&#62;&#60;/row&#62;&#60;row id=&#39;8813&#39;&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;C.G.&#60;/cell&#62;&#60;cell&#62;xxxx&#60;/cell&#62;&#60;cell&#62;xxxxRoad #27&#60;/cell&#62;&#60;cell&#62;Benicia&#60;/cell&#62;&#60;cell&#62;CA&#60;/cell&#62;&#60;cell&#62;94510-&#160;&#160;&#160; &#60;/cell&#62;&#60;cell&#62;(707) 747-xxxx&#60;/cell&#62;&#60;cell&#62;&#60;/cell&#62;&#60;cell&#62;&#60;![CDATA[]]&#62;&#60;/cell&#62;&#60;/row&#62;&#60;/rows&#62;</p>
</div>
<p style="padding-left: 30px;">&#160;</p>
<p style="padding-left: 30px;">So I see the grid but it isn&#39;t populated with any data. Must be just something simple but I can&#39;t seem to find out what it is!</p></p>
]]></description>
        	        	<pubDate>Sat, 23 Jul 2011 03:50:28 +0300</pubDate>
        </item>
</channel>
</rss>