I couldn't find a better tutorial for creating an admin grid which is editable. And the grid column contains dropdown boxes. And there's only one save button for the entire grid. (Means there's no Action column anymore). I'll provide a mock diagram of the grid which I want to generate. Please suggest if found any tutorials or way to achieve this easily. I have created this grid form. But it's not saving data.
2 Answers
Here is a tutorial
http://www.atwix.com/magento/inline-editing-in-magento-backend-grids/
It suggests you override the column renderers
Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Input
to allow inline editing, it will save the data as each control is edited rather than at the end with a save button.
I have never seen such a thing, but what you want is more or less, what phpmyadmin implemented in one of the last versions:
- you have a
<form>
around the whole grid - you click in a cell and get a input/dropdown/whatever editable element
- you click the save button and submit the form
- you process the data in the backend and save it.
Your question is far too broad to answer it concrete. If you have implemented parts of it and have problems, come with the magento parts here and with the JS problems on stackoverflow or here.
-
I don't say it is too broad. What I say is: It is too broad to deliver a solution instead of a path where to go. The blog post by atwix helps, but don't solve the whole problem, so even a blog post doesn'T cover what she needs :) Commented Feb 24, 2015 at 9:05
-
I don't think the question is too broad, she even included a diagram which is more than most Commented Feb 24, 2015 at 13:23
-
The question is "Please suggest if found any tutorials or way to achieve this easily" Commented Feb 24, 2015 at 13:24
-
There is no way to achieve this easily and we are not the ones which google for someone else. At least this is my point of view Commented Feb 24, 2015 at 15:02
-
1I understand your point about googling it.! I only actually replied because I remembered the tutorial from when I was looking up information about custom grids. I do take your point about people using google though. Commented Feb 24, 2015 at 15:27