amc
Posts: 22
|
Posted: 10/30/2012, 6:10 PM |
|
Hi,
I have an editable grid and I want to change some values in the INSERT statement.
I add this (for example) in the Before Build Insert Event
$Container -> DataSource -> TextBox4 -> SetValue(99);
but the value inserted is the old one, not the 99.
What's wrong?
Thanks
|
|
|
bannedone
Posts: 273
|
Posted: 10/30/2012, 7:48 PM |
|
Should be
$Container->your_control_name->SetValue("99");
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
amc
Posts: 22
|
Posted: 10/31/2012, 3:38 AM |
|
I tried this also but no luck...
|
|
|
amc
Posts: 22
|
Posted: 10/31/2012, 5:44 AM |
|
After a lot of research getting crazy....I created a new page from zero and
$Container -> DataSource -> TextBox4 -> SetValue(99); is correct. It works.
Something's wrong in my page. TextBox4 form field has been added later to the existing grid when I added a new field to the table. Maybe I forgot something, maybe CCS didn't add something....
|
|
|
MichaelMcDonald
Posts: 640
|
Posted: 10/31/2012, 11:45 AM |
|
Method proposed by bannedone works on all server types, and is PHP syntactically correct.
WAMP & XAMP and Windows local development environments are very forgiving, however omitting "" from around 99 causes errors on certain server configurations.
I did not know this early in the piece and as a result have spent many frustrating hours, even days recoding pages so I could put them on the public internet.
Listen to experience.
_________________
Central Coast, NSW, Australia.
|
|
|
|