I have several radio buttons for the user to choose from. I need to enable
or disable a particular radio button, depending on a certain condition.
How can I do this?
Thanks, Leonard 6 10835
Hi Leonard,
I'm not sure what you mean. Unless you simply are looking for the Enabled property. Set the Enabled property to false for the RadioButton in question when you test the condition.
On Fri, 30 Sep 2005 16:47:06 +0200, Leonard <Le*****@discussions.microsoft.com> wrote: I have several radio buttons for the user to choose from. I need to enable or disable a particular radio button, depending on a certain condition.
How can I do this?
Thanks, Leonard
--
Happy coding!
Morten Wennevik [C# MVP]
Sorry, I should have been more clear. I don't want to disable all of the
radio buttons in the group, only a single one in the collection.
"Morten Wennevik" wrote: Hi Leonard,
I'm not sure what you mean. Unless you simply are looking for the Enabled property. Set the Enabled property to false for the RadioButton in question when you test the condition.
On Fri, 30 Sep 2005 16:47:06 +0200, Leonard <Le*****@discussions.microsoft.com> wrote:
I have several radio buttons for the user to choose from. I need to enable or disable a particular radio button, depending on a certain condition.
How can I do this?
Thanks, Leonard -- Happy coding! Morten Wennevik [C# MVP]
As Morten says, you just disable the specific radiobutton. F.x. if we
have 3 radiobuttons (rb1, rb2, rb3) in a groupbox (grp_radiobuttons)
and you want to disable rb2, then you just write rb2.enabled = false.
I apologize. I'm kind of new at this. I have just discovered the control
the radio buttons are on are a radiobuttonlist control. Should I make them
radio buttons and put them in a group box? The help indicates it is easier
to determine which one was selected, in a radiobuttonlist control.
"kea" wrote: As Morten says, you just disable the specific radiobutton. F.x. if we have 3 radiobuttons (rb1, rb2, rb3) in a groupbox (grp_radiobuttons) and you want to disable rb2, then you just write rb2.enabled = false.
I'm afraid I'm not familiar with the RadioButtonList (for future reference indicate if the control in question is a web control as they differ somewhat from windows controls), but I don't think you can enable a single RadioButton in that list. You can as you say use individual RadioButtons in a container control like a GroupBox and enable and disable them as you like.
--
Happy coding!
Morten Wennevik [C# MVP]
Thanks
"Morten Wennevik" wrote: I'm afraid I'm not familiar with the RadioButtonList (for future reference indicate if the control in question is a web control as they differ somewhat from windows controls), but I don't think you can enable a single RadioButton in that list. You can as you say use individual RadioButtons in a container control like a GroupBox and enable and disable them as you like.
-- Happy coding! Morten Wennevik [C# MVP] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: VK |
last post by:
Hi!
What I'm missing in following code? Cannot get the values of
radiobuttons. Starting only one class (GetVariant), it works. When I put
two classes together, it doesn't.
Regards, VK
from...
|
by: William Gill |
last post by:
I am placing radiobuttons in a 4 X 4 matrix (using loops) and keep
references to them in a 2 dimensional list ( rBtns ). It works
fine, and I can even make it so only one button per column can be...
|
by: rodrigo |
last post by:
I have a Asp.net table control that I dynamically add rows from a SQL
database. Inside the table, I add radiobuttons and they all have
different ID numbers according to BindChain()
Looking In...
|
by: sofie |
last post by:
Hello all,
I use the following javascript function in a html document to set the
level of one of eight available radiobuttons. The line that's
commented out works fine under IE, but I need to...
|
by: dave |
last post by:
I have half a dozen web form radio buttons on a web form. Each of them is set to postback=true. However, if for instance radiobutton1 is already selected and the user selects it again, it performs...
|
by: Leonard |
last post by:
I have several radio buttons for the user to choose from. I need to enable
or disable a particular radio button, depending on a certain condition.
How can I do this?
Thanks, Leonard
|
by: Radiobutton via DotNetMonster.com |
last post by:
i need help with radiobuttons.
i am useing 1button and 2 radiobuttons i am trying to make it so when u
select a radiobutton and hit button1 it will clear radiobuttons 1 and 2.
--
Message...
|
by: Igor |
last post by:
RadioButton have property Checked (true or false).
If I make RadioButtons with code, without drawing by mouse than I have
problems. I write like this:
Dim rb(0 To 2) As RadioButton
Dim n As...
|
by: =?Utf-8?B?UmljaA==?= |
last post by:
If you enclose a group of radiobuttons (option buttons in MS Access) in an
option group control (a frame control) in Access -- the frame control will
return the index of the option button that is...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |