Magento grids are very useful for displaying/filtering and sorting data. Their flexibility is endless, you can customize them in any way. One may want to add a new radio button or checkbox column for rapid marking. Here is how you can add custom checkbox or radio button column in Magento admin grid. Radio button: Checkbox: Further, in Form.php you can add this below code to have by default behavior and onclick behaviour:
$this->addColumn('some_id', array( 'header_css_class' => 'a-center', 'header' => Mage::helper('adminhtml')->__('Some Header'), 'type' => 'radio', 'html_name' => 'items[]', 'align' => 'center', 'value' => array('1') )); $this->addColumn('some_id', array( 'header_css_class' => 'a-center', 'header' => Mage::helper('configurator')->__('Some Header'), 'index' => 'some_id', 'type' => 'checkbox', 'align' => 'center', 'values' => array('1', '2') )); $fieldset->addField('some_id', 'checkbox', array( 'label' => Mage::helper('magentostudy_news')->__('Featured'), 'name' => 'featured', 'value' => 1, 'checked' => ($model->getFeatured() == 1) ? 'true' : '', 'onclick' => 'this.value = this.checked ? 1 : 0;', 'disabled' => false, 'readonly' => false, ));
Magento Admin Grid: Add Radio/Checkbox Column
Magento grids are very useful for displaying/filtering and sorting data. Their flexibility is endless, you can customize them in any way. One may want to add a
Work with Scriptbaker
Let's talk about your project
Whether you're extending an existing platform, modernising legacy code, or planning something new, our engineers can help. Tell us what you're working on and we'll explore a practical technical solution together.
Related posts
Magento
Magento 1: Export Catalog Categories by Store View
Learn how to export Magento 1 catalog categories for a specific store view as a CSV file using a simple PHP script. This guide covers store-view IDs, localized category names, active and inactive categories, URL keys, SEO data, troubleshooting, CSV encoding, security considerations, and practical tips for managing multilingual Magento catalogs.
Magento
Magento 1: Export Manufacturers CSV by Store View
Learn how to export Magento 1 manufacturer attribute options to a CSV file for a specific Store View. This step-by-step guide includes a PHP script, multilingual store-view handling, troubleshooting tips, CSV best practices, and FAQs to help with Magento data migration, catalog management, and custom reporting.
Magento
Search Magento products by product labels
Project Overview: Task was to develop a Product Labels Magento extension. Where admin can create product labels by uploading an image, enter label title and att