Re: DB_DataObject and Structures_DataGrid integration
| From: | Olivier Guilyardi | Date: | Fri, 13 Aug 2004 14:01:40 +0000 |
| Subject: | Re: DB_DataObject and Structures_DataGrid integration | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32615@lists.php.net to get a copy of this message | ||
Jackson Miller wrote:
On Friday 13 August 2004 08:33 am, Olivier Guilyardi wrote:Oops, sorry, I missed that. But the documentation states : "Todo: This method needs to be intuituve and more flexible, possibly a seperate column object?" Personnally, I think the .NET way to attach event handlers is very interesting. As I proposed previously this could be done with : $column = new Structures_DataGrid_Column_Link("Edit"); $column->attachEventHandler("edit_callback_function"); $datagrid->addColumn($column); And a convenient shortcut : $datagrid->addButton("Edit", "edit_callback_function");But personnally I would use an Edit button and a dedicated form page in most cases. And DataGrid does not even support it... To me, these inline forms are not-so-needed advanced features,DataGrid supports that functionality now, it just doesn't do it for you. In my oppinion it _shouldn't_ do it for you. By adding a formatter callback to a column declaration you are able to create edit links in a column. I have even created formatters that add both edit and delete links in a single column. I have the edit links going to a QuickForm page.
Are you wanting it to create both "views" for you?What do you call "views" ? FormView and GridView? If this is what you mean, no, DataGrid is the grid, the form is another control. I think .NET-style inline forms may bring confusion. -- og