This is a migrated thread and some comments may be shown as answers.

Edititemtemplate

1 Answer 34 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Tina
Top achievements
Rank 1
Tina asked on 10 Nov 2011, 02:30 AM
I have a radbutton and a textbox in edititemtemplate.How can i make the textbox disabled when user clicks the radbutton?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 10 Nov 2011, 04:04 AM
Hello Tina,

You can try the following code snippet.

C#:
protected void RadButton1_Click(object sender, EventArgs e)
  {
    TreeListEditableItem itm = (TreeListEditableItem)(sender as RadButton).NamingContainer;
    TextBox txt = (TextBox)itm.FindControl("txt");
    txt.Enabled = false;
  }

Thanks,
Princy.
Tags
TreeList
Asked by
Tina
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or