navcan
Posts: 61
|
| Posted: 09/23/2005, 10:29 AM |
|
Hello All,
Using CCS 2.3.0.28 (asp + sql). I have a editable grid of two text fields. Want to save the data in uppercase on submit whether it's an update or insert.
Tried the following code in "Before Execute Update" but no luck 
form1.textbox1.value = LTrim(UCase(form1.textbox1.value))
form1.textbox2.value = LTrim(UCase(form1.textbox2.value))
Help please...
|
 |
 |
mrachow
Posts: 509
|
| Posted: 09/23/2005, 12:18 PM |
|
Not sure at the moment but maybe Before Execute Update is to "late".
Give event OnValidate a try.
_________________
Best regards,
Michael |
 |
 |
Sergeant Pepper
|
| Posted: 09/26/2005, 12:05 AM |
|
It is possible with JavaScript.
In the "onBlur" Jave event simply use:
this.value = this.value.toUpperCase();
This will put your text to upper case.
Best
Stephan
|
|
|
 |
Edd
Posts: 547
|
| Posted: 09/26/2005, 6:43 AM |
|
I personally would have created a trigger on the database. That way you will always get a consistent entry.
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
DonB
|
| Posted: 09/26/2005, 11:30 AM |
|
Or at the least, up-case it in the Validate event (when your database
doesn't support triggers, for example). To rely on client-side scripting is
dangerous - people can have that disabled and then the data won't be
up-cased like you wanted.
--
DonB
http://www.gotodon.com/ccbth
"Edd" <Edd@forum.codecharge> wrote in message
news:64337fae4a07d4@news.codecharge.com...
> I personally would have created a trigger on the database. That way you
will
> always get a consistent entry.
>
> Edd
> _________________
> a simple idea....
> www.syntech.com.au
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
navcan
Posts: 61
|
| Posted: 09/26/2005, 4:53 PM |
|
Hi everyone,
It's always nice to have positive responses and various suggestions from the codecharge community. All of you suggested good ideas however I also got a response from support. The solution is very simple.
Just add the following code Before Build Update and Before Build Insert events (they are fired several times for every update and insert row).
form_name.DataSource.field_name.value = new_value
this worked perfect.
Thank you all for your superb support.
Regards,
navcan
|
 |
 |