all groups > asp.net webcontrols > april 2006 >
You're in the

asp.net webcontrols

group:

Checkbox items under a RadioButton


Checkbox items under a RadioButton Web learner
4/12/2006 3:08:47 PM
asp.net webcontrols: I have to have three RadioButtons and then under one of this RadioButton, I
need to put two checkboxes. Something like following:

O Temperature
[] Air
[] Water
O Radiaton
O Wind Velocity

The child CheckBoxes (Air and Water in above example) should become
"activated" only when the parent RadioButton (Temperature in above example)
is selected. I am just confused how to get this done.

Any example in this regard will be gratefully appreciated.

web_learner

Re: Checkbox items under a RadioButton Swanand Mokashi
4/12/2006 5:06:20 PM
you can have the page postback by setting AutoPostBack="true" and
OnSelectedIndexChanged="rdo_SelectedIndexChanged"

in the server side function rdo_SelectedIndexChanged check the current value
of the radiobutton and then set the Enabled property of the checkbox to true
or false

HTH

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services


[quoted text, click to view]

Re: Checkbox items under a RadioButton Web learner
4/12/2006 8:38:56 PM
Aha ! I got the idea now. I tried and it works fine.
I run into another design problem. The "entire form" is posted back, which I
do not want.

How can I have only these two controls posted back? Any idea or any URLs for
me to read?

web_learner


[quoted text, click to view]

AddThis Social Bookmark Button