Home > Archive > PHP Pear > May 2005 > Re: [PEAR] DataGrid - Column Addition
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PEAR] DataGrid - Column Addition
|
|
| Justin Patrin 2005-05-26, 8:59 pm |
| On 5/26/05, Edward Grace <ej.grace@imperial.ac.uk> wrote:
> Is there a way of modifying the Structures::DataGrid object so that using
> addColumn() does not wipe out auto generated columns?
>=20
I've asked for this before, but ended up doing things manually. See my
DB_DO_FB_Frontend code:
http://pear.reversefold.com/horde/c...B_DataObject_F=
ormBuilder_Frontend%2FFrontend%2FShowTab
le.php#115
> I've looked through the code but cannot see where using the addColumn() m=
ethod
> wipes out auto column generation.
addColumn itself does not do this. The columns are auto-created only
if there are no columns added. See Structures/DataGrid/Renderer.php
function _setDefaultHeaders().
>=20
> The reason I want to do this is to implement buttons / links automaticall=
y for
> DataGrid generated tables from a DataObject source. Essentially I am loo=
king
> for a way to automatically augment the generated table with controls (Add=
/
> Edit / or checkboxes) such as those mentioned in the referenced .Net obje=
ct:
>=20
That's the same reason I wanted to do it, see the other addColumn
calls in the above code. IMHO it's easy enough to manually add the
columns, so I didn't push further. However, I would think it would be
pretty easy to make the auto-column creation happen if the
generate_columns option is set in the DataSource. The quesiton then is
whether they should be before or after the manually added columns....
--=20
Justin Patrin
| |
| Matte Edens 2005-05-26, 8:59 pm |
| Why not come up with some functions called "insertColumnBefore" and
"insertColumnAfter". Kinda like what was added to QuickForm. Standard
"addColumn" parameter list but with an extra one for placement. Or an
"appendColumn" that wouldn't interfere with the auto-generation system
and allow for trailing columns (which is where I put my "tools" column).
Maybe if I find some time... :)
matte - matte@arubanetworks.com
webmonkey
Justin Patrin wrote:
>That's the same reason I wanted to do it, see the other addColumn
>calls in the above code. IMHO it's easy enough to manually add the
>columns, so I didn't push further. However, I would think it would be
>pretty easy to make the auto-column creation happen if the
>generate_columns option is set in the DataSource. The quesiton then is
>whether they should be before or after the manually added columns....
>
>
>
| |
| Andrew Nagy 2005-05-27, 4:00 pm |
| Justin Patrin wrote:
> I've asked for this before, but ended up doing things manually. See my
> DB_DO_FB_Frontend code:
> http://pear.reversefold.com/horde/c...owTable.php#115
Sorry for not implementing this, I must have lost your request in the
black hole that is my inbox.
Can you or someone add this to the bug system? I want to try to get a
new release out soon, so if it is in the bug system it will get included
in the next release.
Thanks
Andrew
| |
| Edward Grace 2005-05-27, 4:00 pm |
| > Can you or someone add this to the bug system? I want to try to get a
> new release out soon, so if it is in the bug system it will get included
> in the next release.
Sure.. In progress.
|
|
|
|
|