Finding Controls that are nested in templates of Web User Control Toolbar

2 posts, 0 answers
  1. Peter Georgiev
    Peter Georgiev avatar
    14 posts
    Member since:
    Jan 2006

    Posted 14 Jul 2006 Link to this post

    Requirements

    r.a.d.toolbar version

    1.2

    .NET version

    2

    Visual Studio version

    2005

    programming language

    C#

    browser support

    all browsers supported by r.a.d.toolbar


     
    PROJECT DESCRIPTION

    As the title suggests, this project shows how to access controls that are nested in template buttons of a r.a.d.toolbar web user control. The toolbar has two template buttons, but we use only one of them for this demo. A label's Text property takes the value of the Text property of a nested textbox.

    I use the FindControl method consecutively and indexing of the TemplatedButtons collection to reach the nested textbox.  

  2. Gregory Ott
    Gregory Ott avatar
    7 posts
    Member since:
    Aug 2007

    Posted 13 Sep 2007 Link to this post

    I"m finding the controls fine but the value of my dropdownlist is always -1

    DropDownList m_IssuePurposeTypeDropDown = (DropDownList)GetWOTemplateButton().FindControl("m_IssuePurposeTypeDropDown");

    private RadToolbarTemplateButton GetWOTemplateButton()

    {

    RadToolbarTemplateButton m_WOButton = (RadToolbarTemplateButton)this.m_LocationServiceRadToolbar.Items.TemplatedButtons[1];

    return m_WOButton;

    }

Back to Top