Re: how to edit multple rows in one view

2008-10-20 Thread hydra12
I'd recommend jquery instead of cake's ajax (personal preference, but I think jquery is easier to understand than prototype). Be careful setting all the grades to 0. I don't know your exact situation, but at the school where I work we give parents the ability to see their student's grades online

Re: how to edit multple rows in one view

2008-10-20 Thread teknoid
To save multiple records or multiple related models you can use saveAll(). On Oct 20, 7:04 pm, "soldier.coder" <[EMAIL PROTECTED]> wrote: > On Oct 20, 3:49 pm, hydra12 <[EMAIL PROTECTED]> wrote: > > > I asked about ajax because that actually makes things easier in some > > ways.  You can set each

Re: how to edit multple rows in one view

2008-10-20 Thread soldier.coder
On Oct 20, 3:49 pm, hydra12 <[EMAIL PROTECTED]> wrote: > I asked about ajax because that actually makes things easier in some > ways.  You can set each grade to save via ajax when the teacher moves > on to the next grade.  It all happens transparently in the background, > so no looping through

Re: how to edit multple rows in one view

2008-10-20 Thread hydra12
There isn't any built-in functionality. When you submit your data, debug $this->data to see what was sent in. Then do loop through the data and save each grade individually. Here's the catch - you have to set the id to null each time you save a new row, or each new row will overwrite the last o

Re: how to edit multple rows in one view

2008-10-20 Thread soldier.coder
This doesn't have to be ajax or have any fancy transitions. Just a save button would be fine. I guess more than anything I am asking is there any built-in facility for saving more than one record at a time? Investigation into the grades_controller reveals if (!empty($this->data) { $this->Gra

Re: how to edit multple rows in one view

2008-10-20 Thread hydra12
This can get complicated VERY fast. First, do you want the changes to be made immediately, or does the teacher have to click a submit/save button to save changes? Second, is ajax an option? hydra12 On Oct 20, 10:27 am, "soldier.coder" <[EMAIL PROTECTED]> wrote: > Hello coders! > > I'm trying t

how to edit multple rows in one view

2008-10-20 Thread soldier.coder
Hello coders! I'm trying to build a nice gradebook app, so teachers can keep of students grades. Right now, scaffolding has given me enough to enter one grade for one grade category for one student. The way my code is set up, teachers choose categories (like writing assignments, oral presentatio