Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageWhy 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.... > > >
Post Follow-up to this messageJustin 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
Post Follow-up to this message> 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.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.