Re: Some more questions about Structures_DataGrid
| From: | Olivier Guilyardi | Date: | Tue, 30 May 2006 18:58:37 +0000 |
| Subject: | Re: Some more questions about Structures_DataGrid | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24204@lists.php.net to get a copy of this message | ||
Hi Jose and Justin,
First of all, Jose, I recommend that you use the CVS version.
Just check it out with :
cvs -d:pserver:cvsread@cvs.php.net:/repository login
(password: phpfi)
cvs -d:pserver:cvsread@cvs.php.net:/repository co pear/Structures_DataGrid
Justin Patrin wrote:
On 5/30/06, Jose Manuel Zea <jmzeag@yahoo.es> wrote:Justin, please... that is a hack. This problem is currently adressed in bug #7710 "bind() interferes with rendering" : http://pear.php.net/bugs/bug.php?id=7710 A more acceptable workaround IMO is to turn "generate_columns" off (that's the default) and declare all columns with addColumn(), as shown there : http://pear.php.net/manual/en/package.structures.structures-datagrid.example-advanced.php1. I don´t want to show the value of the primary key in the table, but I need this value in the formatter of some of the columns, for example for the edit and delete links. I cannot access to this value if I don´t show it, but this is not relevant data for the user, it must be hide. Is there a way to access to this value?A quick workaround would be to add a style to the PK column to make the cells display: none.
Jose, please post a feature request about this, where you fully describe your need.2. I could transform the Pager options ($renderer->getPaging) to work in an ajax way, the problem now is with the links in the header of the columns. Is there a way to get a javascript call in these headers instead of a link?Yes, just put it in the header text and don't give a column for the "sorting column" parameter. I actually use some code to use JS sorting when all of the records are on on page using this method.
We're trying to support the PHP callback pseudo-type : http://www.php.net/manual/en/language.pseudo-types.php Try : $column->setFormatter(array($object, 'method')); or $column->setFormatter(array('class', 'method')); You may now also pass custom data with : $column->setFormatter(array($object, 'method'), $data); Regards, -- og3. Is there a way to establish as formatter an object function instead of just a function?I believe there was a checkin yesterday that allows some more options for the formatter. However, it has always supported "static" calls as in: http://pear.reversefold.com/horde/chora/co.php?r=1.2&f=DB_DataObject_FormBuilder_Frontend%2FFrontend%2FLimitColumn.php#16