Re: Proposal - HTMLDataGrid

From: Date: Sat, 10 Jan 2004 21:40:09 +0000
Subject: Re: Proposal - HTMLDataGrid
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24963@lists.php.net to get a copy of this message
Andrew Nagy wrote:
I have been working on a class for my own use that mimics the .net framework's DataGrid. I would like to propose it to the PEAR library if this is something that fits its guidelines. I have a fully functional version now that does some of the basic ideas of the datagrid such as sorting, row coloring, formatting, etc. You can map it to any type of record set by setting it to an associative array. This makes it easy to use for a database or an XML document. It could do a lot more and i want to continue to develop it. It is my most favorite feature in .net. Would this be a good addition to PEAR?
A very good one... like other people, I've made my own implementation of something in this direction, but I didn't propose it because I am not yet satisfied with its feature set. You say the data source must be an associative array? I wouldn't really like that because it can make building the table more memory-intensive than it has to be. In my implementation, I've taken the approach of driver classes for different datasource types (like Arrays, DB_Result objects or DataObjects) which handle each kind of datasource appropriately - so you don't have to load all query results into memory at once. The rest sounds very promising... my implementation can't do sorting by itself for example, you have to do that with an external Javascript or by manually altering the query. Let's see some code :-) CU Markus

« previous php.pear.dev (#24963) next »