473,624 Members | 1,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mutually exclusive radio button

js
I include a asp:RadioButton in an ItemTemplate of a DataGrid like the
following. However, the radio buttons are not mutual exclusive where
select one will deselect the rest of the radio buttons. I know there is
a similar bug with RadioButton in a DataList. Does this bug also apply
to Datagrid? If not, how can I set them to be selected mutually
exclusively?

<asp:datagrid id="MyDataGrid " runat="server" CssClass="Inven toryTable">
<ItemStyle CssClass="inven toryListItemSty le"></ItemStyle>
<AlternatingIte mStyle CssClass="inven toryListAlterna teItemStyle" />
<HeaderStyle CssClass="inven toryListHeaderS tyle"></HeaderStyle>
<Columns>
<asp:TemplateCo lumn>
<ItemTemplate >
<asp:RadioButto n ID="rdoSelected " Runat="server"
GroupName="rdoG roup"/>
</ItemTemplate>
</asp:TemplateCol umn>
</Columns>
</asp:datagrid>

Nov 19 '05 #1
2 3215
Try the RadioButtonList instead.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I include a asp:RadioButton in an ItemTemplate of a DataGrid like the
following. However, the radio buttons are not mutual exclusive where
select one will deselect the rest of the radio buttons. I know there
is a similar bug with RadioButton in a DataList. Does this bug also
apply to Datagrid? If not, how can I set them to be selected mutually
exclusively?

<asp:datagrid id="MyDataGrid " runat="server"
CssClass="Inven toryTable">
<ItemStyle CssClass="inven toryListItemSty le"></ItemStyle>
<AlternatingIte mStyle CssClass="inven toryListAlterna teItemStyle" />
<HeaderStyle CssClass="inven toryListHeaderS tyle"></HeaderStyle>
<Columns>
<asp:TemplateCo lumn>
<ItemTemplate >
<asp:RadioButto n ID="rdoSelected " Runat="server"
GroupName="rdoG roup"/>
</ItemTemplate>
</asp:TemplateCol umn>
</Columns>
</asp:datagrid>


Nov 19 '05 #2
js
This won't work because I need only ONE radio button in the first
column of each data row in DataGrid. I need to allow sorting on the
DataGrid header which RadioButtonList does not support or it is not
easy to implement. Any more idea? Thanks.

Nov 19 '05 #3

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

Similar topics

5
1865
by: wooks | last post by:
I have defined a schema with an xsd:choice element for 2 mutually exclusive fields. When both are present I get an error which is good, but what is not so good is the error message which says something like "Element content is invalid. Expecting: fieldname, {...." The problem (if it is one) is that the "Expecting: fieldname..." bit is wrong - fieldname is not the next field... in fact it's optional. However it seems to have tagged...
3
459
by: softengine | last post by:
Can and how do you alter a data view to include a look up field from another data table? The data table of the dataview only has the key, the value I need is in another data table. Can and how to you reference the value of a column in a data table/view from the row filter string of a different data view. I'm using a strongly typed dataset. Below is more info.
5
3710
by: WertmanTheMad | last post by:
Ive been playing with this for a few days and thought I might thow it out for seggestions. I have Several Queries that need counts returned The Queries are Mutually Exclusive meaning whatever Query they return in first they cannot be included in the counts of any queries below them. This set of queries for example
2
1591
by: MR. UNDERHILL | last post by:
I want to use a radio button as a template column in a data grid, what is happening is that the exclusive selection is not working since the internal radio button name is being generated by the DataGrid control. Is there a way to work around this behavior? Thanks in advance
2
1927
by: Stimp | last post by:
I'm getting the error: 'SelectedIndex' and 'SelectedValue' attributes are mutually exclusive when I try to populate a series of dropdowns... any idea what I could be doing wrong here? Thanks. --
0
1280
by: sloan | last post by:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;316495 Radio Buttons Are Not Mutually Exclusive When Used in a Repeater Server Control ... Has 2.0 fixed this bug ?
0
1267
by: sloan | last post by:
BUG: Radio Buttons Are Not Mutually Exclusive When Used in a Repeater Server Control http://support.microsoft.com/default.aspx?scid=kb;EN-US;316495 I programmed up a pretty simple page in 2.0. The issue seems to still be there. Is it supposed to be fixed for 2.0?
8
1968
by: arun | last post by:
Hi Can any one suggest me how to access the mutually exclusive check boxes in a table of 7 rows by 14 columns. Only one can be selected in each row. Other than checking each one with if condition is there any other way( for example by using their keys or something). Please help me. Arun
2
3370
by: arun | last post by:
Hi Can any one suggest me how to access the mutually exclusive check box extender in a table of 7 rows by 14 columns. Only one can be selected in each row. Other than checking each one with if condition is there any other way( for example by using their keys or something). Please help me. Arun( arun@greettech.com )
0
8238
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8174
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8680
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8478
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7164
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2607
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 we have to send another system

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.