RE: [PEAR-DEV] Proposal - HTMLDataGrid
| From: | Andrew S. Nagy | Date: | Sun, 11 Jan 2004 16:32:29 +0000 |
| Subject: | RE: [PEAR-DEV] Proposal - HTMLDataGrid | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24979@lists.php.net to get a copy of this message | ||
Here is the source: http://webitecture.org/HTMLDataGrid/
> -----Original Message-----
> From: Markus Wolff [mailto:wolff@21st.de]
> Sent: Saturday, January 10, 2004 4:40 PM
> To: Andrew Nagy
> Cc: pear-dev@lists.php.net
> Subject: Re: [PEAR-DEV] Proposal - HTMLDataGrid
>
>
> 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.
Well hopefully we can work together on this :)
At work, we have devised a very similar "datagrid" and we use
DataObjects and we also use smarty for the templating. I would like to
port many of the ideas we have created for that into this project. I
would like to use some of the existing pear projects like HTML_Table
>
> 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.
>
The sorting is done by passing an element to the query string which can
then be used in your sql. There is no dynamic sorting as of yet. I
could do array sorting or javascript sorting, but that hasn't been
developed yet, nor thought out.
> Let's see some code :-)
>
> CU
> Markus
>
>