I have to use this link for add import button in custom grid.
How to add Upload Button for importing a csv file in the Custom Admin Grid Container?
but I don't know how to add its action?
it is my makemodel.php file
<?php
class Sigmasolve_Makemodel_Block_Adminhtml_Makemodel extends Mage_Adminhtml_Block_Widget_Grid_Container
{
public function __construct()
{
$this->_controller = 'adminhtml_makemodel';
$this->_blockGroup = 'makemodel';
$this->_headerText = Mage::helper('makemodel')->__('Item Manager');
$this->_addButtonLabel = Mage::helper('makemodel')->__('Add Item');
parent::__construct();
$this->_addButton("Import", array(
"label" => Mage::helper("core")->__("Import"),
"onclick" => "location.href = '" . $this->getUrl('makemodel/adminhtml_import') . "';",
"class" => "btn btn-danger",
));
}
}
Best Answer
Please make "Import" controller and "index" as shown below:-