Re: Re: Structures_DataGrid feedback
| From: | Markus Wolff | Date: | Wed, 14 Apr 2004 18:45:27 +0000 |
| Subject: | Re: Re: Structures_DataGrid feedback | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11843@lists.php.net to get a copy of this message | ||
Andrew Nagy wrote:
3. Adding "Edit" columns is quite unintuitive, even after skimming the function code, and I could not make it work with a class method ( static or not ). Maybe resorting to the good old call_user_func() would work. I am still working on the "formatter" method, I am trying to make it as easy and intuitive as possible. Let me know if you have any suggestionsNot having used the package myself yet, I'm playing with the thought of just making a subclass of the Column class like this: class EditColumn extends Structures_DataGrid_Column {
function EditColumn($fieldName)
{
$this->columnName = "Edit";
$this->fieldName = $fieldName;
}
function formatter($record)
{
// My custom formatting code goes here
}
}
...and then just make an instance of that class and pass it to the DataGrid object - would that be possible?
CU
Markus