473,769 Members | 3,923 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Get RadioButton value from Nested Repeatr

Hy there,

pla.. i have 2 nested repeaters. In the child i have 3 radiobuttons.
Already made my homework and figured out how to allow only one radio to be
checked....

but now, i can't find out which radio is selected.

the submit (asp:Button) button is placed inside the ParentRepeater
FooterTemplate.
tks in advance,
christiano
Oct 31 '08 #1
1 2560
simple, just do a recursive walk:

//get list of all selected Radio buttons

var list = FindControls(Pa ge, c=c is RadioButton && ((RadioButton)
c).Checked);

public static List<ControlFin dControls(
Control parent,
Predicate<Contr olmatch)
{
var list = new List<Control>() ;
foreach (Control ctl in parent.Controls )
{
if (match(ctl))
list.Add(ctl);
list.AddRange(F indControls(ctl , match));
}
return list;
}
-- bruce (sqlwork.com)
"Christiano Donke" wrote:
Hy there,

pla.. i have 2 nested repeaters. In the child i have 3 radiobuttons.
Already made my homework and figured out how to allow only one radio to be
checked....

but now, i can't find out which radio is selected.

the submit (asp:Button) button is placed inside the ParentRepeater
FooterTemplate.
tks in advance,
christiano
Oct 31 '08 #2

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

Similar topics

8
2852
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 Tkinter import * class GetVariant: def __init__(self): self.root = Tk()
11
7874
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 selected, by assigning each column to an intVar. In many languages a radiobutton has a property that can be directly read to see if it is selected on unselected. Tkinter radiobuttons don't seem to have any such property. Is there any way to...
0
4139
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 BindChain() Sub for the line: AddHandler Rb.CheckedChanged, AddressOf BindAssembly_Click
3
36182
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 rewrite it so that it's W3C compliant. Reading through earlier messages I concluded I should go with getElementById but this doesn't work. What am I doing wrong? Your help is much appreciated.
2
1874
by: JeffFinnan | last post by:
<form name=form1> Load in Viewer Window: <input name="radiobutton" type="radio" value="1" checked onClick="1"> 1&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="2" onClick="2"> 2&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="3" onClick="3"> 3&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="4" onClick="4"> 4
1
4048
by: Dmitry V. Markin | last post by:
Good day! Here is my problem: I need to have a radiobutton column in my DataGrid for a representation of a bool column, where only row can be checked at one time(only one value in bool column can be true). So I've created a class inheriting from DataGridColumnStyle and added the following code to the class: protected RadioButton rb ; ....
3
7282
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 a postback. I only want to do a postback if the value of the radiobutton is changed. What is the best method to accomplish this? thx dave
0
2585
by: Alan Samet | last post by:
If you need to get in touch with me, be sure to remove the "newsgroups" from my email address. I've developed a quick-and-dirty workaround for putting System.Web.UI.WebControls.RadioButton controls in repeater-style controls. I've only tested it a little, but it seems like it should work fine for getting around that naming issue that arises when you have a set of radio buttons that should be grouped together; but because they exist on...
4
4695
by: Jim in Arizona | last post by:
In html and ASP, I would easily code radio buttons as needed, such as: <input type="radio" name="question1" value="1">1</input>&nbsp; <input type="radio" name="question1" value="2">2</input>&nbsp; <input type="radio" name="question1" value="3">3</input> If I use the <asp:radiobuttoncontrol, I can do this: <asp:RadioButton ID="RB1" GroupName="question1" runat="server" />1 <asp:RadioButton ID="RB2" GroupName="question1" runat="server"...
0
9589
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
10216
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
10049
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
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
8873
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
7413
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
5309
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
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.