hi,
I am trying to edit the row in the grid view, where i have a radiobuttonlist with three radio buttons. radiobuttonlist should not be edited when we click on edit but should be displayed. I tried to find the control and give the property but I could find the control. please help me...
thanks in advance.
Loading
Dipa AhujaPosted May 14, 2010, 7:12 AM
srinathPosted May 14, 2010, 5:39 AM
Actually, what i need to do is --
I have a gridview, in that I placed radiobuttonlist with three radio buttons and text box.
when I check the two radio buttons, the text should be enabled and for another radiobutton, textbox must be disabled.
I wrote the code but it's not working
protected void rblist11_SelectedIndexChanged(object sender, EventArgs e)
{
foreach (GridViewRow item in GridView1.Rows)
{
RadioButtonList rbl = item.FindControl("rblist11") as RadioButtonList;
TextBox txtamount = item.FindControl("TextBox3") as TextBox;
if (rbl.SelectedItem.Value == "0")
{
txtamount.Enabled = false;
}
else if ((rbl.SelectedItem.Value == "1") || (rbl.SelectedItem.Value == "2"))
{
txtamount.Enabled = true;
}
}
}
plz help me..
Dipa AhujaPosted May 11, 2010, 8:41 AM
srinathPosted May 11, 2010, 7:46 AM