For dyanamic radio button
ceate a dyanamic radio buttons in a group box?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Mahak GuptaRank #138 · 16.2K reputationPosted May 3, 2012, 11:53 PM EDT
Lajapathy ArunRank #354 · 7K reputationPosted May 4, 2012, 12:50 AM EDT
public partial class MyUserControl : UserControl
{
public MyUserControl()
{
InitializeComponent();
}
public void AddRadioButton(int count)
{
for (int i = 0; i <= count; i++)
{
RadioButton rdo = new RadioButton();
rdo.Name = "RadioButton" + i;
rdo.Text = "Radio Button " + i;
rdo.Location = new Point(5, 30 * i);
this.Controls.Add(rdo);
}
}
}
Kunal VaishyaRank #990 · 2K reputationPosted May 4, 2012, 2:02 AM EDT