Editable grid

Hello,

I like to have a grid where I can display all the users. On that form
there
is a edit button.
So I like to choose a user and when I press edit then a form where I
can
edit the user data.

Is this possible and how can I achieve it.

Roelof

On 5 July 2014 21:34, Roelof W. [email protected] wrote:

Hello,

I like to have a grid where I can display all the users. On that form there
is a edit button.
So I like to choose a user and when I press edit then a form where I can
edit the user data.

Is this possible and how can I achieve it.

Yes of course it is possible. Almost any such thing can be
accomplished. First work out how you would do it using html,
javascript and css (or whatever), then create the views and code to
generate that.

If you don’t know enough to describe the html, javascript and css then
this is not the right list to ask, but probably you need to read some
books on those technologies.

Colin

Hello,

I thought about using wice_grid but I do not see how I can “save” the
selection that a user made so I can pass it to the edit form.

Roelof

Op zaterdag 5 juli 2014 22:49:22 UTC+2 schreef Colin L.:

On Jul 5, 2014, at 4:34 PM, Roelof W. wrote:

Hello,

I like to have a grid where I can display all the users. On that form there is a
edit button.
So I like to choose a user and when I press edit then a form where I can edit
the user data.

Is this possible and how can I achieve it.

Roelof

This is basic stuff, easily managed in Rails. The key to any enhancement
like this is to start with the basic CRUD views, such that you show your
list of users, click an edit link on the individual user in the list, go
to a separate page where you show the form, fill out the form, save
changes, and then go back to the list (or show the user, makes no
difference at this point). rails generate scaffold whatever will get you
this far with zero effort.

Once you have the basics completed such that you can make changes and
persist them, then you can layer the Ajax routes on top of that. Rails
provides the remote: true flag pretty much everywhere you may need it
(link_to, form_for) to accomplish this trick. Bringing up your edit form
in an overlay (lightbox) instead of a separate page is a simple matter
of adding an edit.js.erb file to render the view.

Walter