M
mohit_raghav2003
I have have to check if the dynamically created radiobutton is checked
or not.... i am not able to do that at all... i tried to create an
event handler as well but it didnot work....so this is what the
application should do...
create radio buttons dynamically in wizard sheet...
user selects a user name....
then returns the name of the user selected i.e. text of the radio
button....
not able to do that .....
sending the code...
plzzzzzzzzzzzzzzzzzzzzzz help
private string SelectUserName()
{
string name = "";
int num = 0;
num = asd.Tables["tbluser"].Rows.Count;
Array ComArray = new Array[num];
wizardSheet1 company = new wizardSheet1();
num = 15;
for (int i = 0; i < asd.Tables["tbluser"].Rows.Count; i++)
{
RadioButton rad = new RadioButton();
company.Controls.Add(rad);
rad.Location = new System.Drawing.Point(15,num);
rad.Text = asd.Tables["tbluser"].Rows[1].ToString();
//rad.Click += new System.EventHandler(checkuser());
//ComArray.c
rad.Name = "rad" + i.ToString();
num = num +30;
}
if (company.ShowDialog() == DialogResult.OK)
{
return company.CompanyName.ToString();
}
else
{
//company.
return "error";
}
}
or not.... i am not able to do that at all... i tried to create an
event handler as well but it didnot work....so this is what the
application should do...
create radio buttons dynamically in wizard sheet...
user selects a user name....
then returns the name of the user selected i.e. text of the radio
button....
not able to do that .....
sending the code...
plzzzzzzzzzzzzzzzzzzzzzz help
private string SelectUserName()
{
string name = "";
int num = 0;
num = asd.Tables["tbluser"].Rows.Count;
Array ComArray = new Array[num];
wizardSheet1 company = new wizardSheet1();
num = 15;
for (int i = 0; i < asd.Tables["tbluser"].Rows.Count; i++)
{
RadioButton rad = new RadioButton();
company.Controls.Add(rad);
rad.Location = new System.Drawing.Point(15,num);
rad.Text = asd.Tables["tbluser"].Rows[1].ToString();
//rad.Click += new System.EventHandler(checkuser());
//ComArray.c
rad.Name = "rad" + i.ToString();
num = num +30;
}
if (company.ShowDialog() == DialogResult.OK)
{
return company.CompanyName.ToString();
}
else
{
//company.
return "error";
}
}