I’m very new to this framework and I would appreciate some assistance…
I have a CGridview on a page filled with a few columns of data.
I want to make it possible for the enduser to edit the value from one of these columns and commit these changed to the MySQL database.
I made an extra column with a button in it. What I’d like is that users can change values in a certain column, click on the button in the last column, and the new data gets updated in the database.
What would be a good solution for this? Any help is appreciated…
gridview does not support that. Try searching online for jqgrid or sigma grid.
An easy way to implement this is to give each row an id and when the edit link is click pop a dialog with a form containing all the data for that row, on save close the dialog and update the row with the new data.
Your idea is not a simple task.
With CGridView I think would be a good option to look in this direction:
for create the table use GListView, it give you more freedom still supplying ajax paging and sorting
for collect the input read CollectTabularInput
Anyway, this is really a heavy task. I’d like to advice you to postpone and work a bit more in order to be sure on more standard task before trying this one.
Thanks for the advise. I’ll look into your suggestions, and I’m going to see if I can find an alternative approach.
You are welcome.
P.S: welcome to the forum!