How to attach event handlers to controls nested in templates of a menu user control

1 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 21 Dec 2006 Link to this post

    Requirements

    RadControls version

    v4.2 or Telerik.Web.UI v2007.3 1425

    .NET version

    2.0    

    Visual Studio version

    2005

    programming language

    VB

    browser support

    all browsers supported by RadMenu

    To convert code
    from posted project(s)
    Telerik online converter

     
    PROJECT DESCRIPTION
    This project shows how to attach event handlers to controls nested in templates of a RadMenu, when the menu is in a web user control.

    This is achieved by using the FindControl method consecutevely to access the user control and the RadMenu that resides in it. Then I index the items collections of the menu to get to the item which holds the control (an asp button in this case) and again call FindControl to retrieve the control by its ID.

    Finally, I manually attach the event handler to the control.
Back to Top