CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 how to set a control's value in an editable grid after submit?

Print topic Send  topic

Author Message
jacem

Posts: 87
Posted: 10/02/2009, 12:15 AM

Hi all, I have an editable grid with a number of rows. During the Row Validate event i have some custom code that checks values submitted and I wish to change the value of a hidden control on the row before the record is saved (either insert or update) to the database. I can get valuesfrom a text control using $Component->Fieldname->GetValue() without an issue however doing a $Component->anotherhiddenfield->SetValue("new data") does not set the control's new value and consequently the insert or update does not save the control new value. I have also tried referencing $Container->anotherhiddenfield->SetValue("new data") and also referencing the form itself during validaterow with $formname->anotherhiddenfield->SetValue("new data")

Is setvalue() on a rows controls ignored if they are set during validaterow when CCS comes to build the insert or update?
View profile  Send private message
swissmade

Posts: 4
Posted: 10/12/2009, 2:49 PM

Hy,

If you still have the problem.
I had the same.
look at this code
if ($Container->CachedColumns["primary_key_field_name"][$Container->RowNumber] =="")
// empty row
$Container->Col_You_like->SetValue(CCGetSession("Variable"));
This works.
I use that to fill a empty field when I add a new record in the event before update


_________________
Trying to understand CCS and I start to get it. with the necessery handycaps. Put I like it.
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.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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