*/ class Mage_Adminhtml_Block_Customer_Group_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setId('customerGroupGrid'); $this->setDefaultSort('type'); $this->setDefaultDir('asc'); $this->setSaveParametersInSession(true); } /** * Init customer groups collection * @return void */ protected function _prepareCollection() { $collection = Mage::getResourceModel('customer/group_collection') ->addTaxClass(); $this->setCollection($collection); return parent::_prepareCollection(); } /** * Configuration of grid */ protected function _prepareColumns() { $this->addColumn('time', array( 'header' => Mage::helper('customer')->__('ID'), 'width' => '50px', 'align' => 'right', 'index' => 'customer_group_id', )); $this->addColumn('type', array( 'header' => Mage::helper('customer')->__('Group Name'), 'index' => 'customer_group_code', )); $this->addColumn('class_name', array( 'header' => Mage::helper('customer')->__('Tax Class'), 'index' => 'class_name', 'width' => '200px' )); return parent::_prepareColumns(); } public function getRowUrl($row) { return $this->getUrl('*/*/edit', array('id'=>$row->getId())); } }