CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Multiple Row Insert in Editable Grid

Print topic Send  topic

Author Message
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.
View profile  Send private message
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.
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.