class MyModule_Block_Adminhtml_MyGrid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setId('my_grid'); $this->setDefaultSort('name'); $this->setDefaultDir('ASC'); $this->setSaveParametersInSession(true); } protected function _prepareCollection() { $collection = Mage::getModel('mymodule/my_model')->getCollection(); $this->setCollection($collection); return parent::_prepareCollection(); } protected function _prepareColumns() { $this->addColumn('name', array( 'header' => Mage::helper('mymodule')->__('Name'), 'align' =>'left', 'index' => 'name' )); $this->addColumn('description', array( 'header' => Mage::helper('mymodule')->__('Description'), 'align' =>'left', 'index' => 'description' )); return parent::_prepareColumns(); } }In this example, the `MyModule_Block_Adminhtml_MyGrid` class extends the `Mage_Adminhtml_Block_Widget_Grid` class and sets some default parameters for the grid, such as the default sort column and direction. The `_prepareCollection()` method sets the collection of items to display in the grid (in this case, a collection of `MyModule_Model_MyModel` objects), and the `_prepareColumns()` method adds columns to the grid representing the properties of those objects. This class is part of the Magento adminhtml library.