I have a admin grid in admin panel, which I created using Ultimate module creator.
This Module has following columns in database table:
1. id
2. ref_id
3. ref_type
4. position
Thus, the admin grid also has the same columns.
But my requirement is to show the admin grid differently i.e
1. name
2. email
3. location
4. position
I can change the columns by visiting {namespace}/{module_name}/Block/Adminhtml/{module_name}/Grid.php
But how to fill the values in newly added columns based on the old column values for each row?
I tried like this which didn't work:
$this->addColumn('name', array(
'header' => Mage::helper('modulename')->__('Name'),
'index' => 'name',
'type' => 'text',
'value' => 'hello' //Here I am trying to manipulate this column using "ref_id" and "ref_type"
));
Please help
PS: The user can edit only "position" field (which is the only visible field), when he/she clicks edit action.