<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: XAJAX PHP Live Datagrid / Gridview</title>
	<atom:link href="http://www.cyberdyne.org/~icebrkr/2007/05/03/xajax-php-live-datagrid-gridview/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cyberdyne.org/~icebrkr/2007/05/03/xajax-php-live-datagrid-gridview/</link>
	<description>Somewhat damaged. . .</description>
	<lastBuildDate>Tue, 19 Jan 2010 19:52:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: drifter</title>
		<link>http://www.cyberdyne.org/~icebrkr/2007/05/03/xajax-php-live-datagrid-gridview/comment-page-1/#comment-255</link>
		<dc:creator>drifter</dc:creator>
		<pubDate>Thu, 20 Nov 2008 01:17:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberdyne.org/~icebrkr/?p=82#comment-255</guid>
		<description>This class is great but is a little overkill in some aspects and short in others. Try the Eyesis Data Grid Control: http://www.eyesis.ca/projects/datagrid.html

It&#039;s one or two classes and has way more features.</description>
		<content:encoded><![CDATA[<p>This class is great but is a little overkill in some aspects and short in others. Try the Eyesis Data Grid Control: <a href="http://www.eyesis.ca/projects/datagrid.html" rel="nofollow">http://www.eyesis.ca/projects/datagrid.html</a></p>
<p>It&#8217;s one or two classes and has way more features.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bouton</title>
		<link>http://www.cyberdyne.org/~icebrkr/2007/05/03/xajax-php-live-datagrid-gridview/comment-page-1/#comment-161</link>
		<dc:creator>bouton</dc:creator>
		<pubDate>Tue, 27 Nov 2007 15:39:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberdyne.org/~icebrkr/?p=82#comment-161</guid>
		<description>I am trying to make it such that the columns can be dynamic  and &quot;generify&quot; it and are passed in  rather than hard coded as they are in your files. This is what I am trying
gridview.php
[code]


	var cols = null;
	cols = new Array();
	cols[&#039;user_ID&#039;]		= &quot;User ID&quot;;
	cols[&#039;first_name&#039;]	= &quot;First Name&quot;;
	cols[&#039;last_name&#039;]	= &quot;Last Name&quot;;
	xajax_showDataGrid(0,25,&quot;&quot;,&quot;DESC&quot;,&quot;&quot;,cols);

[/code]

This is where I have changed your function so the columns are dynamically processed. (I use ezsql which builds the query on the fly)
[code]
function showDataGrid($intStart=0, $intLimit=25, $strOrderCol=NULL, $strSortDir=&quot;ASC&quot;, $strWhere=NULL.$cols=NULL)
	{
		GLOBAL $commonDB;
		$objResponse = new xajaxResponse();
		$objDataGrid = new clsDataGrid();
		$objDataGrid-&gt;setTableName(&#039;ibDataGrid&#039;);
                 ...
		$objDataGrid-&gt;setSortDir($strSortDir);
		$objDataGrid-&gt;setDBColumns( array_keys($cols) );
		$objDataGrid-&gt;setColumnHeaders( array_values($cols) );

		$query = I use my own builder here

		if ($commonDB-&gt;query($query))
		{
			while($row = $commonDB-&gt;fetchRow())
			{
				$objDataGrid-&gt;addRow($row);
			}
			$objDataGrid-&gt;setTotalRows(getNumRows());
			$objResponse-&gt;assign(&#039;dataGrid&#039;, &quot;innerHTML&quot;, $objDataGrid-&gt;renderDataGrid());
		}
		else
		{
			$objResponse-&gt;assign(&#039;dataGrid&#039;, &quot;innerHTML&quot;, &quot;No results found.&quot;);
		}
		return $objResponse;
	}
[/code]

This works great. I am able to build the table on the fly fine with whatever columns I pass in via the javascript - UNTIL I sort. Thenit blows up. I see there is an onclick that needs to be edited in classes/clsDataGrid.php but I can&#039;t seem to be able to pass the dynamic cols in.

Any suggestions?
Thanks</description>
		<content:encoded><![CDATA[<p>I am trying to make it such that the columns can be dynamic  and &#8220;generify&#8221; it and are passed in  rather than hard coded as they are in your files. This is what I am trying<br />
gridview.php</p>
<div class="codesnip-container" >var cols = null;<br />
	cols = new Array();<br />
	cols['user_ID']		= &#8220;User ID&#8221;;<br />
	cols['first_name']	= &#8220;First Name&#8221;;<br />
	cols['last_name']	= &#8220;Last Name&#8221;;<br />
	xajax_showDataGrid(0,25,&#8221;",&#8221;DESC&#8221;,&#8221;",cols);</div>
<p>This is where I have changed your function so the columns are dynamically processed. (I use ezsql which builds the query on the fly)</p>
<div class="codesnip-container" >function showDataGrid($intStart=0, $intLimit=25, $strOrderCol=NULL, $strSortDir=&#8221;ASC&#8221;, $strWhere=NULL.$cols=NULL)<br />
	{<br />
		GLOBAL $commonDB;<br />
		$objResponse = new xajaxResponse();<br />
		$objDataGrid = new clsDataGrid();<br />
		$objDataGrid-&gt;setTableName(&#8216;ibDataGrid&#8217;);<br />
                 &#8230;<br />
		$objDataGrid-&gt;setSortDir($strSortDir);<br />
		$objDataGrid-&gt;setDBColumns( array_keys($cols) );<br />
		$objDataGrid-&gt;setColumnHeaders( array_values($cols) );</p>
<p>		$query = I use my own builder here</p>
<p>		if ($commonDB-&gt;query($query))<br />
		{<br />
			while($row = $commonDB-&gt;fetchRow())<br />
			{<br />
				$objDataGrid-&gt;addRow($row);<br />
			}<br />
			$objDataGrid-&gt;setTotalRows(getNumRows());<br />
			$objResponse-&gt;assign(&#8216;dataGrid&#8217;, &#8220;innerHTML&#8221;, $objDataGrid-&gt;renderDataGrid());<br />
		}<br />
		else<br />
		{<br />
			$objResponse-&gt;assign(&#8216;dataGrid&#8217;, &#8220;innerHTML&#8221;, &#8220;No results found.&#8221;);<br />
		}<br />
		return $objResponse;<br />
	}</p></div>
<p>This works great. I am able to build the table on the fly fine with whatever columns I pass in via the javascript &#8211; UNTIL I sort. Thenit blows up. I see there is an onclick that needs to be edited in classes/clsDataGrid.php but I can&#8217;t seem to be able to pass the dynamic cols in.</p>
<p>Any suggestions?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bouton</title>
		<link>http://www.cyberdyne.org/~icebrkr/2007/05/03/xajax-php-live-datagrid-gridview/comment-page-1/#comment-160</link>
		<dc:creator>bouton</dc:creator>
		<pubDate>Tue, 27 Nov 2007 11:30:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberdyne.org/~icebrkr/?p=82#comment-160</guid>
		<description>Timothy
Still no luck with the url. Even with removing the period from the link above. I tried 
http://dev.surveybench.com/iBLivedatagrid/gridview.php which existed - but didn&#039;t work.  I have it all working - by far the easiest of the grids I&#039;ve found- but am missing some of the images - so just trying to get them to complete my page. Thanks!</description>
		<content:encoded><![CDATA[<p>Timothy<br />
Still no luck with the url. Even with removing the period from the link above. I tried<br />
<a href="http://dev.surveybench.com/iBLivedatagrid/gridview.php" rel="nofollow">http://dev.surveybench.com/iBLivedatagrid/gridview.php</a> which existed &#8211; but didn&#8217;t work.  I have it all working &#8211; by far the easiest of the grids I&#8217;ve found- but am missing some of the images &#8211; so just trying to get them to complete my page. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy</title>
		<link>http://www.cyberdyne.org/~icebrkr/2007/05/03/xajax-php-live-datagrid-gridview/comment-page-1/#comment-159</link>
		<dc:creator>Timothy</dc:creator>
		<pubDate>Mon, 26 Nov 2007 18:31:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberdyne.org/~icebrkr/?p=82#comment-159</guid>
		<description>I moved the example to http://dev.surveybench.com/gridvew.php.  Once I implement a few more features and clean up some things here and there, I&#039;ll repackage the whole project.  Thanks for all the input and suggestions!</description>
		<content:encoded><![CDATA[<p>I moved the example to <a href="http://dev.surveybench.com/gridvew.php" rel="nofollow">http://dev.surveybench.com/gridvew.php</a>.  Once I implement a few more features and clean up some things here and there, I&#8217;ll repackage the whole project.  Thanks for all the input and suggestions!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bouton</title>
		<link>http://www.cyberdyne.org/~icebrkr/2007/05/03/xajax-php-live-datagrid-gridview/comment-page-1/#comment-158</link>
		<dc:creator>bouton</dc:creator>
		<pubDate>Mon, 26 Nov 2007 17:28:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberdyne.org/~icebrkr/?p=82#comment-158</guid>
		<description>Your download does not include all the images and your example site site does not exists. Other thanthat - looks good.</description>
		<content:encoded><![CDATA[<p>Your download does not include all the images and your example site site does not exists. Other thanthat &#8211; looks good.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
