Edititemtemplate

2 posts, 0 answers
  1. Tina
    Tina avatar
    130 posts
    Member since:
    Jul 2011

    Posted 09 Nov 2011 Link to this post

    I have a radbutton and a textbox in edititemtemplate.How can i make the textbox disabled when user clicks the radbutton?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 09 Nov 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top