473,473 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

RadioButtonList Control

How can I programmatically change the selected item within the above
control. I only have 2 items within it and I want to set the default
(programmatically) to item 1.
I've tried rdselector.items(1).selectedvalue = true (or something along
those lines) but the item selected does not change. I've tried 0 as well.

TIA

Jun 27 '08 #1
4 1659
Axapta,

In fact the radio button are almost useless without setting them in pairs in
a groupbox.
(Or you should only have two)

If you select then one, then the other is changed automaticly

For some it is a strange behaviour that if you use data binding, you have
only to bind one.

Cor

"axapta" <ja********@gmail.comschreef in bericht
news:69**********************************@microsof t.com...
How can I programmatically change the selected item within the above
control. I only have 2 items within it and I want to set the default
(programmatically) to item 1.
I've tried rdselector.items(1).selectedvalue = true (or something along
those lines) but the item selected does not change. I've tried 0 as well.

TIA
Jun 27 '08 #2
Hi Cor,
I don't quite understand what you are saying in relation to my problem.

I have a radiobuttonlist - 2 items. The first item is defaulted, however
the user is able to choose the 2nd item if they want. I have a button which
clears all the controls on my form (text boxes, DDL's). I want the
radiobuttoblist to be reset (when this button is clicked) to item1 if it is
set to item2.

Thanks

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:29**********************************@microsof t.com...
Axapta,

In fact the radio button are almost useless without setting them in pairs
in a groupbox.
(Or you should only have two)

If you select then one, then the other is changed automaticly

For some it is a strange behaviour that if you use data binding, you have
only to bind one.

Cor

"axapta" <ja********@gmail.comschreef in bericht
news:69**********************************@microsof t.com...
>How can I programmatically change the selected item within the above
control. I only have 2 items within it and I want to set the default
(programmatically) to item 1.
I've tried rdselector.items(1).selectedvalue = true (or something along
those lines) but the item selected does not change. I've tried 0 as
well.

TIA
Jun 27 '08 #3
If you set 1 then 2 is reset, that is automaticly and vice versa the same.

Cor

"axapta" <ja********@gmail.comschreef in bericht
news:BC**********************************@microsof t.com...
Hi Cor,
I don't quite understand what you are saying in relation to my problem.

I have a radiobuttonlist - 2 items. The first item is defaulted, however
the user is able to choose the 2nd item if they want. I have a button
which clears all the controls on my form (text boxes, DDL's). I want the
radiobuttoblist to be reset (when this button is clicked) to item1 if it
is set to item2.

Thanks

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:29**********************************@microsof t.com...
>Axapta,

In fact the radio button are almost useless without setting them in pairs
in a groupbox.
(Or you should only have two)

If you select then one, then the other is changed automaticly

For some it is a strange behaviour that if you use data binding, you have
only to bind one.

Cor

"axapta" <ja********@gmail.comschreef in bericht
news:69**********************************@microso ft.com...
>>How can I programmatically change the selected item within the above
control. I only have 2 items within it and I want to set the default
(programmatically) to item 1.
I've tried rdselector.items(1).selectedvalue = true (or something along
those lines) but the item selected does not change. I've tried 0 as
well.

TIA
Jun 27 '08 #4
What is a RadioButtonList? I don't have such a control. As Cor says, you
would normally add radio buttons to a panel or other such container to make
your own Radio Button List.

Is this a custom control you got from somewhere, or are you refering to a
CheckedListBox?

"axapta" wrote:
How can I programmatically change the selected item within the above
control. I only have 2 items within it and I want to set the default
(programmatically) to item 1.
I've tried rdselector.items(1).selectedvalue = true (or something along
those lines) but the item selected does not change. I've tried 0 as well.

TIA
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike S | last post by:
I am trying to use a RadioButtonList bound to a custom datasource to acomplish some user functionality. I want to add various onmouseover/onmouseout/onblur/onfocus events to each individual...
6
by: DotNetGruven | last post by:
I have a webform that has a DataGrid on it with a RadioButtonList in each row. It is a simple On & Off. When the User Clicks on either of the RadioButtons, I need to postback to the server and...
4
by: Emil | last post by:
Can somebody tell me what would be the syntax for having an if statement and setting the selected index of a radiobuttonlist? This is my first project using ASP.net and I use C#. I have a repeater...
5
by: Øyvind Isaksen | last post by:
I'm making a page to update articles. When a radiobuttonlist is displayed, I want the stored value to be displayed as default (checked). Example: I use a procedure to display the...
2
by: Michael Bohman | last post by:
Hi, i have a small problem with assigning a database value to a RadioButtonList control. On my form i have 3 user admin=1, premium=2 and basic=3, theese values is stored in an access database in a...
0
by: Sudheer Aalla | last post by:
Hi, When I try to reference the radiobuttonlist control in edititemtemplate in ItemDataBound event of datalist control I am getting NULL reference. I am trying to pre select the yes/no button...
5
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hallo, I have a radiobuttonlist control that is added on a custom Web User Control. This control has a property that exposes the SelectedIndex property of the embedded radiobuttonlist. When...
0
by: =?Utf-8?B?QW5keSBpbiBTb3V0aCBKZXJzZXk=?= | last post by:
I want to use a RadioButtonList Control(HTML) in a GridView control. I can see the RadioButtonList control with each row in the GridView with the code: <asp:GridView ID="GridView1"...
6
by: SAL | last post by:
hello, I'm using a radiobuttonlist in an updatepanel in an item template in a Gridview control. I'm populating the radiobuttonlist in the RowDataBound event. I have the control toolkit registered...
13
by: tommymo | last post by:
Hi everyone I'm new to this site and the world of ASP.Net C# programming. I have been learning controls and integrating them with a SQL database. So far I have been able to move along and understand...
0
marktang
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,...
0
jinu1996
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...
1
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...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.