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.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI 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.
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 input
s and make them be transferred with usual mass action data.
Possible solutions:
varienGridMassaction
to send more data during submit.$this->_addButton()
. Create controller which will process your ajax request. Create javascript function to get data from input fields from grid and send ajax request to your controller. During creating button specify onclick
attribute with the name of your function.
– oleksii.svarychevskyi
Feb 10 '14 at 10:23