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

Thread is closed for posting
2 posts, 0 answers
  1. 97AD96E1-EF11-4E30-BCDB-005E455D92B6
    97AD96E1-EF11-4E30-BCDB-005E455D92B6 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. 0CFC05D2-B691-4D0E-93CA-ED786695E531
    0CFC05D2-B691-4D0E-93CA-ED786695E531 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

This Code Library is part of the product documentation and subject to the respective product license agreement.