Reputation: 4421
I have created an admin module that replicates the CMS->Page grid layout. I have copied the core code from adminhtml\default\default\template\widget\grid.phtml
to my admin page template file and made my block for that template extend Mage_Adminhtml_Block_Widget_Grid
.
The CMS pages display fine and I have also managed to add my own column to the grid, however none of the default columns (or my own) are sortable or filterable.
Does anyone know what might be going on here? Have I made an error somewhere or would I manually need to make these default fields sortable?
Upvotes: 0
Views: 342
Reputation: 792
A good place to start would be this class, used for the product grid:
Mage_Adminhtml_Block_Catalog_Product_Grid
In particular the functions
_prepareCollection()
and
_prepareColumns()
I've used that block as the basis for my own custom grids. If you need any further pointers feel free to let me know and I'll do my best to take a look
Upvotes: 3