I have admin form with grid. in my grid i have set checkbox as another form field but it gives disabled when it rendered.My code is as below.

Layout file.

    <block type="core/text_list" name="root" output="toHtml">
        <block type="shippinggroup/adminhtml_shippinggroup_edit_tab_formcustomer" name="shippinggroup.edit.tab.formcustomer" />
        <block type="adminhtml/widget_grid_serializer" name="customer_grid_serializer" >
                <action method="initSerializerBlock">
                <action method="addColumnInputName">


grid column.

$this->addColumn('customer_ids', array(
        'header_css_class'  => 'a-center',
        'type'              => 'checkbox',
        'name'              => 'customer_ids',
        'values'            => $this->_getSelectedCustomers(),
        'align'             => 'center',
        'index'             => 'entity_id'
   $this->addColumn('position', array(
        'header'            => Mage::helper('catalog')->__('Position'),
        'name'              => 'position',
        'type'              => 'checkbox',
        'validate_class'    => 'validate-number',
        'index'             => 'position',
        'values'            => '',

Here is screenshot of output https://www.screencast.com/t/xCqsQ6NCF

I would also like to display label for column.

Please guide me on this.


your data_callback is getSelectedCustomers


and you are calling

'values'            => $this->_getSelectedCustomers(),

change it to

'values'            => $this->getSelectedCustomers(),
  • that is not the main point.i have two checkbox in one grid i want it work separately and post in form.currently it render disable when edit record.when i checked on first checkbox it also check all the second column checkbox too. – MageLerner Feb 13 '17 at 6:34
  • @MageLerner you want to get post values of this gird? on based on that add some column? – Qaisar Satti Feb 13 '17 at 6:40
  • yes exactly i would like it work seperately both checkbox and post – MageLerner Feb 13 '17 at 6:42
  • @MageLerner you can get grid values simply use this code $this->getRequest()->getPost('customer') – Qaisar Satti Feb 13 '17 at 6:46
  • yes i can but second checkbox is not working correctly dear – MageLerner Feb 13 '17 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.