Is there any way to make all checkboxes checked in particular column in admin grid.
I want checkboxes checked by default in "skip" column.
Here is a code for this column:
protected function _prepareColumns()
{
parent::_prepareColumns();
$this->addColumn('skip', array(
'header' => Mage::helper('importexport')->__('Skip'),
'type' => 'checkbox',
'name' => 'skip',
'field_name' => Mage_ImportExport_Model_Export::FILTER_ELEMENT_SKIP . '[]',
'filter' => false,
'sortable' => false,
'align' => 'center',
'index' => 'attribute_id'
));
//other columns here
if ($this->hasOperation()) {
$operation = $this->getOperation();
$skipAttr = $operation->getSkipAttr();
if ($skipAttr) {
$this->getColumn('skip')
->setData('values', $skipAttr);
}
$filter = $operation->getExportFilter();
if ($filter) {
$this->getColumn('filter')
->setData('values', $filter);
}
}
return $this;
}
Best Answer
Try This
just add key 'values' => array(1,2) // your values