anonymous Log in
Search
Recents:
v3.0
csharp-l
fill in radio button
07/22/11 07:22 PM

tscott

Replies:  4


I have an internet application that lists customer orders. The orders
are either approved or unapproved. There are 3 radio buttons at the top
of the page for 'approved' , 'unapproved', and ' all orders'
When someone logs in to look at their orders we automatically show ONLY
unapproved orders but the radio button for 'unapproved orders' is not
filled in so they think they are seeing all orders. The end user would
like the radio button for unapproved filled in. How do I do this?
Sounds like a simple question but, I am fairly new to GeneXus.

Thanks,
Tammy


-----------------------------------------
Para Suscribirse/Desuscribirse:
http://www.gxtechnical.com/cgi-bin/hforum.exe?2,3,30,11
Por consultas owner-csharp-l@gxtech.com.uy
InformaciĆ³n de ESET NOD32 Antivirus, versiĆ³n de la base de firmas de virus 6298 (20110715)
ESET NOD32 Antivirus ha comprobado este mensaje.
http://www.eset.com
Replies

willy8125

07/22/11 07:41 PM
You assign the value for unapproved to the radio button var in the Start Event.
Sent from my Verizon Wireless BlackBerry
----------

jwoo2503

07/22/11 07:47 PM
Initialize the variable used in the condition with a value.


If I understand correctly you have three variables (can work but don't
need).

You should have only one variable and in the control type declare it as a
radio button with three options. Use the same values will read from the
table as the values in the radio button for approved and unapproved make
sure you add an empty value also.

Condition the read with .like.
StatusAttr .like. &StatusVariable;

Best,

Jimmy


Carlos Canessa95624

07/23/11 06:24 PM

Tammy,
What Willy answered in his email is correct, but I would add:
Remember that in WEB the Start event get executed always , meaning in a GET
and in a POST of the page, so each time to click somewhere on the screen,
the radio button will get initialize with the value you have in the start
event, so in order to avoid this, you will have to:
1) Create a variable of the type HttpRequest , in my sample &httpreq
2) in the start event add
If &httpreq.Method = 'GET'
&yourRadioButtonVariable = 'yourInitialValueHere'
Endif
This way the radio button will get initialized only once.
Remember this slide from the GeneXus training?
[image: 7-23-2011 3-20-11 PM.png]
Regards
Carlos
On Fri, Jul 22, 2011 at 4:09 PM, Tammy Scott <tscott@martinsnet.com>

tscott

07/25/11 12:08 PM

Carlos,
Thanks.
Sorry but, I really don't remember this slide from training. I barely
remember what I did last month.
Tammy


Back to csharp-l