سؤال

I am very confuse How to Update the Editable Grid Data using Mass action.

I tried but it will got only Id in post. any one done this before then please guide me.

Please See the below Image If any one know the answer then let me know.

enter image description here

هل كانت مفيدة؟

المحلول

I cannot give you the direct answer but I definitely know the way.

For every admin grid magento creates javascript object varienGridMassaction. It is defined in \js\mage\adminhtml\grid.js.

During selecting checkboxes in grid, varienGridMassaction object saves ids of selected rows.

When you select mass action type and press Submit button you are not submitting form in normal meaning of this word. This button runs varienGridMassaction::apply(), which gets all selected ids and sends them with mass action type to the server.

So you cannot simply add inputs and make them be transferred with usual mass action data.

Possible solutions:

  • You can rewrite varienGridMassaction to send more data during submit.
  • Create one more button and javascript class to process your custom input fields.
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top