ckroon
Posts: 869
|
| Posted: 07/02/2009, 2:27 AM |
|
Hi All.
I have been playing with the AutoRow example in the Solutions pack and I have a question for you all.
Is there a way to get an editable grid to automatically populate rows with records from another table.
Example
'Students" table has many students in it. Only 12 are assigned to the current user.
"Assignments" table has fields for studentid and testid.
Each editable grid row will populate labels with the student name, grade and a checkbox. Also on each row are two hidden fields ,one for testid (which it populates from the URL with a CCGetFromGet) and for the student id.. the editable grid will insert the checked students into the assignments table.
I need the editable grid to populate with the Users 12 students and have their studentid in the hidden field on the Editable grid.
Is there an example solution anyone can point me to?
Thanks in advance!
_________________
Walter Kempees...you are dearly missed. |
 |
 |
jacem
Posts: 87
|
| Posted: 07/02/2009, 6:01 AM |
|
I think you simply populate the table prior to the form being called by executing a sql statement as part of afterinitialise event trigger. See http://forums.yessoftware.com/posts.php?post_id=106914 for the sql execution code example if you haven't done it before. You would just need to write your sql statement incorporating variables into the where component.
Hope this helps.
|
 |
 |
Waspman
Posts: 948
|
| Posted: 07/03/2009, 1:44 AM |
|
Sorry man I don't understand, can't you populate the grid from 2 tables?
_________________
http://www.waspmedia.co.uk |
 |
 |
|