 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
rhysjo
Joined: 26 Dec 2006 Posts: 1
|
Posted: Tue Dec 26, 2006 8:15 pm Post subject: Using Structures_DataGrid_Column::setFormatter |
|
|
I am able to get the examples for the DataGrid library to work just fine. However, once I try to embed the examples into a custom class I can't seem to get the callback functionality in Structures_DataGrid_Column::setFormatter() to work correctly.
| Code: |
class CustomClass(){
.
.
.
function printLastName($params)
{
extract($params);
return $record['lname'] ;
}
.
.
.
$this->datagrid->bind('SELECT * FROM tblUsers', $this->options);
// Define columns
$this->datagrid->addColumn(new Structures_DataGrid_Column('Last Name', null, 'Lname', null, 'n/a', $this->printLastName()));
|
The error I get is ...
Warning: Missing argument 1 for printlastname()
Warning: extract(): First argument should be an array
I just can't seem to get the callback to work correctly. I assume it's just a syntax issue since it works just fine with regular functions outside of a class. Thanks in advance for any help it is much appreciated.
Thanks! |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1003
|
Posted: Sun Jan 07, 2007 6:48 pm Post subject: |
|
|
| For the archives (and people interested in this topic): I have answered this question on the codewalkers.com forum. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|