My custom module uses an Admin Grid to display my model. I have added a link to my edit method with a button as follows:
$this->addColumn('action',
array(
'header' => 'Action',
'width' => '50px',
'type' => 'action',
'getter' => 'getId',
'actions' => array(
array(
'caption' => 'Edit',
'url' => array(
'base'=>'*/*/edit'
),
'field' => 'store_id'
)
),
'filter' => false,
'sortable' => false,
)
);
Nine times out of 10 this works correctly and loads my Edit form with pre-filled data. However one on 10 clicks will load an empty form. This is because the link on the edit button is using id
instead of store_id
.
I’ve tried playing around with the ID’s on the addColumn()
method about but it seems futile this the error is erratic. Even when a link is incorrectly constructed for a row, the other rows will be correct. Further it’s not the same row(s) that experience this behavior.
Really not sure hat else to try.
Bob.