Re: Datagrid vs. Table
| From: | Mark Wiesemann | Date: | Thu, 25 Aug 2005 17:03:20 +0000 |
| Subject: | Re: Datagrid vs. Table | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20592@lists.php.net to get a copy of this message | ||
"php.net" wrote:
> I want to create a table such as the following. I was trying to figure out
> if structures_datagrid or DB_table would work and how to do it.
If you have the values for your projects in a database you can use both
of them. DB_Table itself can only generate forms (with QuickForm) but
not (HTML) tables. Another possibility is to use the HTML_Table package
- but without the sorting features of SDG and without a direct
combination with the database (as you can have with DB_Table).
I would suggested that you use Structures_DataGrid as in the examples in
manual, using the DB_Table DataSource container (only in CVS, an updated
version can be found via the bug tracker; there is also an example on
how to use DB_Table with SDG). You have to create a class extending
DB_Table, see the the documentation on how to do this.
I would use a new SDG instance for each project. For the checkbox and
button ("full details") columns you have to add columns with a formatter
that returns the checkboxes or the buttons - more about this can be
found in the manual.
Mark