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