CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Programmatically update two editable grids?

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 02/11/2009, 3:58 PM

Is it possible to update two editable grids with a single button?

I have a form which is the first of many and the user moves to the next form via a 'Next' button. On this first form there are two editable grids, different tables and no join fields. Can I implement an update of both grids when the 'Next button is pressed?

Thanks.
View profile  Send private message
jacem

Posts: 87
Posted: 02/11/2009, 8:47 PM

One suggestion is to have attached to either Submit button a event trigger that does the update or insert directly using SQL, referencing the fields from the other editable grid.

Doing direct sql in PHP (a mythical 'clients' table updating a field called 'Name' with a primary key of ClientID as an example:

$db =new clsDBMyDatabaseNameDB();
$SQL="UPDATE clients SET `Name`=".$othergrid->name->getvalue()." WHERE `ClientID`='".$othergrid->clientid->getvalue()."'";
$db->query($SQL);
$db->close();

The above might be for update, you will need update code for both grids: one attached to each button referring to the other grids data to update.

Hope this helps.


Quote saseow:
Is it possible to update two editable grids with a single button?

I have a form which is the first of many and the user moves to the next form via a 'Next' button. On this first form there are two editable grids, different tables and no join fields. Can I implement an update of both grids when the 'Next button is pressed?

Thanks.
View profile  Send private message
saseow

Posts: 744
Posted: 02/12/2009, 1:06 AM

Thanks jacem,

This certainly gives me something to work on. I knew that it would not be a simple matter.

Best regards,

Trevor
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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